Vim Bindings For Grouping Keywords

Posted by admin on February 05, 2009

I’m the only person I know who uses vim for grouping keywords. I tried Excel/Open Spreadsheets, but I find it overkill for starting out a campaign. I don’t suggest you begin using vi/vim if you don’t already know how to use it. Failure to heed this advice will lead to severe bruxism and a hole through the monitor.

For those that do use vim, here are two bindings I use to quickly turn a select line to phrase/exact match:

map <F7> :s:^\(.*\)$:[\1]<CR>
map <F8> :s:^\(.*\)$:"\1"<CR>

Select text -> F7 -> adds [ ] between all words. F8 surrounds words (or lines, rather) with ” ”
To quickly add [ ] to every single keyword, I press: gg + GV + F7

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Trackbacks

Use this link to trackback from your own site.

Discuss.

Questions? concerns? corrections? Contact us!