3 ms·
Timestamped notes/lines are great, I've had these in my .vimrc for years "insert date iabbrev <expr> dts strftime("\* %D - %A\n\t") "insert datetime ia
by zx_q12 2y ago
Timestamped notes/lines are great, I've had these in my .vimrc for years
"insert date
iabbrev <expr> dts strftime("\* %D - %A\n\t")
"insert datetime
iabbrev <expr> dtt strftime("%D %H:%M:%S:")
- davidcollantes 2y agoFor the uneducated, how do you use those? Is there a way to insert those automatically, just like the submission does?
- davidcollantes 2y agoI got it. One enters `dtt`, or `dts` and space. It gets replaced by date, or timestamp accordingly. Pretty neat!
- stevekemp 2y agoThose are basically string-replacements. Add those lines to .vim/vimrc, and when you type "dtt" or "dts" that text gets replaced with a time/date stamp. Kinda useful if you want to manually add date/time to lines, but a different thing.