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:
:s/$/\=strftime(“%c”)^M:noh%M
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
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:
:s/$/\=strftime(“%c”)^M:noh%M
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
Thank You
Nice…
interesting
Nice…
Nice
Super. It is a very useful tip.