[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] Can one ^X! direct into text being edited somehow?
From: |
Chris Green |
Subject: |
Re: [vile] Can one ^X! direct into text being edited somehow? |
Date: |
Thu, 6 Sep 2012 15:53:38 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
> > which gets the date in the format I want and then to call this with a
> > map! key.
> >
> > The only bit I can't see how to do is to get the output of a command
> > into a string in the store-procedure. How does one do the equivalent of
> > a shell sequence like "dt=`date +%Y-%m-%d` in a store-procedure?
>
> i thought there was a way, but i'm not finding it.
>
> i know you're asking a more general question, but there's also the
> the &date function:
> | &date | 2 | format 2nd param with 1st, like strftime. |
>
Yes, I'd found that and it would satisfy some of what I want. However I
also want to be able to pop up a calendar widget and select a date to
insert from that.
--
Chris Green
- [vile] Can one ^X! direct into text being edited somehow?, Chris Green, 2012/09/06
- Re: [vile] Can one ^X! direct into text being edited somehow?, Chris Green, 2012/09/06
- Re: [vile] Can one ^X! direct into text being edited somehow?, Paul Fox, 2012/09/06
- Re: [vile] Can one ^X! direct into text being edited somehow?, Chris Green, 2012/09/06
- Re: [vile] Can one ^X! direct into text being edited somehow?, Brendan O'Dea, 2012/09/06
- Re: [vile] Can one ^X! direct into text being edited somehow?, Paul Fox, 2012/09/06
- Re: [vile] Can one ^X! direct into text being edited somehow?,
Chris Green <=
- Re: [vile] Can one ^X! direct into text being edited somehow?, Paul Fox, 2012/09/06
- Re: [vile] Can one ^X! direct into text being edited somehow?, Thomas Dickey, 2012/09/06