Is there a way to auto-insert a time stamp on vi
or vim
at the beginning of each line? Like, upon opening like so:
2025-03-20 15:04:03 Blah blah blah blah
2025-03-20 15:04:15 Bleh bleh bleh bleh
2025-03-20 15:04:22 ...
Is there a way to auto-insert a time stamp on vi
or vim
at the beginning of each line? Like, upon opening like so:
2025-03-20 15:04:03 Blah blah blah blah
2025-03-20 15:04:15 Bleh bleh bleh bleh
2025-03-20 15:04:22 ...
@david@collantes.us While you’re typing? I guess this could be used as a starting point (doesn’t work on the very first line):
inoremap <CR> <Esc>:r!date +"\%F \%T"<CR>A
What’s the end goal here? 😅