This works! Any way to streamline it further?

autocmd BufNewFile * call s:InsertTimestamp()
inoremap <CR> <Esc>:r!date +"\%F \%T"<CR>A 
function! s:InsertTimestamp()
  call setline(1, strftime('%Y-%m-%d %H:%M:%S '))
  normal! G$
endfunction

⤋ Read More

Participate

Login to join in on this yarn.