vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] Can one ^X! direct into text being edited somehow?


From: Thomas Dickey
Subject: Re: [vile] Can one ^X! direct into text being edited somehow?
Date: Thu, 06 Sep 2012 20:11:08 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Sep 06, 2012 at 10:56:22AM -0400, Paul Fox wrote:
> chris wrote:
>  > On Thu, Sep 06, 2012 at 09:36:45AM -0400, Paul Fox wrote:
>  > >  > OK, same problem with my ":r ...." solution as well of course.
>  > >  > 
>  > >  > So, I want to create a command which will get the date without any new
>  > >  > lines, it seems the way to do this will be to create a store-procedure
>  > > 
>  > > i just realized i have that in my .vilerc -- just have never really used
>  > > it.  you can see that it cheats, with regard to the newline thing:  (the
>  > > "day" command prints a formatted date.)
>  > > 
>  > >     store-procedure insert-day
>  > >      insert-string "\n\n"
>  > >      previous-line
>  > >      filter-til goto-eol "day"
>  > >      previous-line
>  > >      join-lines
>  > >      join-lines
>  > >     ~endm
>  > >     bind-key insert-day M-d
>  > > 
>  > Does that 'filter-til goto-eol "day"' actually insert the text sent to
>  > stdout by the "day" command or am I misunderstanding what's going on.
> 
> i think it's the macro language equivalent of "!$day", so yes.

vile has a built-in function &date (dates.rc was last touched in 2001).

   | &date           | 2    | format 2nd param with 1st, like strftime.     |

The &ftime and &stime functions are useful for the 2nd param.

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]