Lyon's Blog
  • Home
  • Tags
  • Archives

Insert datetime in vim

## insert current date
"map F3 to insert current date
nnoremap <F3> "=strftime("%Y-%m-%d (%a)")<CR>P
inoremap <F3> <C-R>=strftime("%Y-%m-%d (%a)")<CR>

http://vim.wikia.com/wiki/Insert_current_date_or_time

http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)

http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Comments
comments powered by Disqus

  • « Use markdown to create presentation
  • HTTP keep-alive »

Published

May 5, 2014

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor