]> gitweb.fluxo.info Git - rhatto/dotfiles/vim.git/commitdiff
Fix: improved current date key binding for ChangeLog entries
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 30 Jul 2024 16:42:52 +0000 (13:42 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 30 Jul 2024 16:42:52 +0000 (13:42 -0300)
vim.dot.link/plugin/key_mappings.vim

index 03a3b51aa5e241bbd57e4a6f097ca6853daa2d39..3284800e2ad9b94694943f49b32fce7198a8ef09 100644 (file)
@@ -248,6 +248,10 @@ noremap <leader>c :call BufferCleansing()<CR>
 "map <leader>d :0put =strftime('%Y-%m-%d')<CR>
 nnoremap <leader>d i<C-R>=strftime('%Y-%m-%d')<CR>
 inoremap <leader>d <C-R>=strftime('%Y-%m-%d')<CR>
-map <leader>e :put =strftime('## %Y-%m-%d')<CR>
+" }}}
+
+" Insert the current date in format useful for ChangeLog.md entries {{{
+"nnoremap <leader>e :put =strftime('## %Y-%m-%d ')<CR>
+nnoremap <leader>e o<CR><C-R>=strftime('## %Y-%m-%d - ')<CR>
 " }}}
 " }}}