scy on Nostr: My #Vim (and #Neovim) can now insert the current date or time using mappings like ...
My #Vim (and #Neovim) can now insert the current date or time using mappings like "<C-R><Leader>d". This is consistent with other Ctrl-R mappings like "<C-R>%" which will insert the current file name.
This was inspired by blaix (npub107d…6qa7)'s post https://hachyderm.io/@blaix/112576852666967922 (commit https://github.com/blaix/homer/commit/9f774be9be0ebd1fe01040257a7f8ce9e8dca5c1), but I've chosen a more general approach that will also work when you already _are_ in insert mode, and also in command-line mode.
https://codeberg.org/scy/dotfiles/src/commit/c02b23d71374d2aaecc0e43a4f0921b76b18391c/.vim/plugin/datetimereg.vim
This was inspired by blaix (npub107d…6qa7)'s post https://hachyderm.io/@blaix/112576852666967922 (commit https://github.com/blaix/homer/commit/9f774be9be0ebd1fe01040257a7f8ce9e8dca5c1), but I've chosen a more general approach that will also work when you already _are_ in insert mode, and also in command-line mode.
https://codeberg.org/scy/dotfiles/src/commit/c02b23d71374d2aaecc0e43a4f0921b76b18391c/.vim/plugin/datetimereg.vim