by freedomben · 1y ago · 0 comments
A bash alias so I can run `todo` and have the file open:
alias todo='nvim "$HOME/.todo.txt"'
Some vim config so I can run `\date` (from either insert mode or normal mode) and it will print a date line for me: inoremap <Leader>date <C-r>=trim(system('date "+%a %B %e, %Y %H:%M:%S %p"'))<CR>
nnoremap <Leader>date :put=trim(system('date \"+%a %B %e, %Y %H:%M:%S %p\"'))<CR><ESC> inoremap <Leader>date <C-r>=strftime("%a %B %e, %Y %H:%M:%S %p")<CR>
nnoremap <Leader>date :put=strftime("%a %B %e, %Y %H:%M:%S %p")<CR>
I am also not sure if an `<esc>` is really necessary at the end of your normal mode map.