Skip to content

Instantly share code, notes, and snippets.

@wmerfalen
Created August 25, 2021 01:39
Show Gist options
  • Save wmerfalen/434ea853979a1da9ce4cf199771ae08b to your computer and use it in GitHub Desktop.
Save wmerfalen/434ea853979a1da9ce4cf199771ae08b to your computer and use it in GitHub Desktop.
create a TODO with the current date and start editing inside the comment
function! ToDate()
exec ":normal! o"
exec ":. ! echo '/** TODO: as of' $(date -I) ' */'"
exec ':normal! k'
exec ':normal! J'
exec ':normal! A'
exec ':normal! 2h'
exec ':startinsert'
endfunction
map <leader>di :call ToDate()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment