To insert time-stamp in a file, you can exit from edit mode and type:
Doesn’t work as easily in windows – you need to say:
:r! date /T
This only gets the date, though. the time you’d have to say:
:r! time /T
Before seeing this tip, I did this to use the Vim internal functions:
This puts the current date and time at the end of the current line. (remember that ^M is actually the enter key captured by preceding it with ctrl-q in windows or ctrl-v in other os)
I put it in a macro so I can just hit @t to get the timestamp
Super. It is a very useful tip.
[...] http://kenno.wordpress.com/2006/08/03/vim-tip-insert-time-stamp/ [...]
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
You are commenting using your Google+ account. ( Log Out / Change )
Connecting to %s
Notify me of follow-up comments via email.
Get every new post delivered to your Inbox.