|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
[PLUG] Re: dynamic file (script output)
|
>>>>> "Md" == MaD dUCK <madduck@madduck.net> writes:
Md> also sprach gabriel rosenkoetter (on Sun, 19 Nov 2000 08:28:28PM -0500):
>> in vi's ex mode :!echo `date` doesn't get you very far (mostly
>> because the output isn't read it). Yes, it's possible to write a vi
>> macro to do this, but it gets *really* messy. (Try it, you'll see.)
Md> :r!date
Md> :r!echo `date`
bah, who needs external processes for that
(defun insert-date ()
(interactive)
(insert (format-time-string "%02m/%d/%Y" (current-time))))
(defun insert-time ()
(interactive)
(insert (format-time-string "%R" (current-time))))
(global-set-key "\C-cd" 'insert-date)
(global-set-key "\C-ct" 'insert-time)
11/19/2000
21:45
-kevin
--
The three most dangerous things in the world are a programmer
with a screwdriver, a hardware type with a program patch and
a user with an idea.
______________________________________________________________________
Philadelphia Linux Users Group - http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|