Favorite Vim Plugins of 2014
These are my favorite Vim plugins of 2014 ranked in no particular order.
vim-exchange makes it easy to exchange text from one place to an other. I always found myself copying and pasting text and it usually took twice as long because I would accidentally overwrite my yanked text with the dw command. Now I can simply cxw on the first text and
cxw to swap them.
targets.vim improves upon the “change inside brackets/quotes” functionality. You can change text inside a pair of brackets without being on the same line. Can change inside commas, pluses and more. A recent update now lets you quickly change arguments of methods.
I originally thought the plugin wasn’t too useful and I don’t like overwriting vim functionality but installed it anyway. It quickly became one of my favorites.
smeatgf.vim adds a command for quick method lookup. When you come across a method you are not familiar with, you can
gf on the word to find the definition.
supertab allows you to use
vim-indent-object implements a new selector based on indentation. This is very useful for moving around blocks of code or re-indenting pasted text and it’s not possible to use
One of my most used plugins.
vim-sneak implements a minimalist motion that jumps to any location specified by two characters. It searches through the whole file and can jump through matches.
vim-surround implements a surround function which lets you add, change or remove brackets/quotes from objects. Add brackets to a word with
yswb. Take then away with
Highly recommended, this plugin is vital for productivity.
vim-operator-gsearch implements a shortcut (g/) that grabs the text you motioned and searches with that in ack or whatever you have setup. This speeds up my workflow by not having to type in anything.
ctrlp.vim is a full-path fuzzy file, buffer, most recently used and tag finder. Hit ctrlP, type in the wanted file and select it.
I use this all the time. The given search engine isn’t very efficient, so I replaced it with ag. Here is my script:
if executable("ag") let g:ackprg = 'ag --nogroup --nocolor --column' " Use Ag over Grep set grepprg=ag\ --nogroup\ --nocolor " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' " ag is fast enough that CtrlP doesn't need to cache let g:ctrlp_use_caching = 0 endif
It’s so fast cache can be turned off and will also respect your .gitignore files.
tcomment.vim provides an easy to use, file-type sensible commenter. Being able to quickly comment out paragraphs, lines and anything with a motion is very useful.
I usually couple this with the indenter plugin to quickly comment out if statements. (
vim-colorschemes adds plenty of awesome colorschemes. I added leader shortcuts to quickly switch between some of my favorite colorschemes.
nnoremap <leader>cg :color gruvbox<CR> nnoremap <leader>ch :color hybrid<CR> nnoremap <leader>cr :color railscasts<CR> nnoremap <leader>cd :color desertEx<CR>
scratch.vim adds a scratch window for notes and hides when inactive. I use this for writing up a small todo list.