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: Paul Fox
Subject: Re: [vile] Can one ^X! direct into text being edited somehow?
Date: Thu, 06 Sep 2012 08:07:59 -0400

chris wrote:
 > On Thu, Sep 06, 2012 at 10:11:06AM +0100, Chris Green wrote:
 > > I want an easy way to insert today's date (or possibly another, I might
 > > get the called command to pop up a calendar) into the text I'm editing.
 > > 
 > > Using ":r !date" is a bit clumsy as one has to exit and return to insert
 > > mode.  
 > > 
 > > The alternative "^X!date" puts the date into a separate buffer so,
 > > again, is a bit clumsy if one simply wants the date inserted at the
 > > point at which one is typing.
 > > 
 > > Is there a quick and easy way to do this or do I need to write a macro?
 > > I guess a macro which does "<ESC>:r !date^Mi" isn't too bad.
 > > 
 > Well I've nearly solved it myself, the following:-
 > 
 >     map! #2 ^[:r !date^Mi
 > 
 > gets the date into the text at the insertion point, the only downside is
 > that the insertion point remains at the beginning of the date.  Since
 > I'm going to use a customized date format of fixed length I think I can
 > just move the required number of characters forward easily enough. 
 > Unless anyone can suggest an easy way of automating the "getting the end
 > of text inserted using 'r'".

it requires opening a new line before doing so, but i use
    !!date
for this sort of thing.  !-filtering is line oriented, so you can't
do less than a line that way.

paul
=---------------------
 paul fox, address@hidden (arlington, ma, where it's 63.7 degrees)



reply via email to

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