Vim allows you to define simple text abbreviations to make entering such strings super-easy. Here's a snip of my .vimrc.
" Some handy abbreviations.
"
" Insert date.
iab xdate=strftime("%Y/%m/%d %H:%M:%S")
" What's my name?
iab xname Mohit Muthanna Cheppudira
" My personal sig.
iab xsigp Mohit Muthanna Cheppudira
" My work sig.
iab xsigw Mohit Muthanna Cheppudira
With the above in my Vim configuration, the text xdate gets auto-replaced to today's date.
Slick.
No comments:
Post a Comment