vim editor: hacks and tricks

Changing case:

This usually works in visual mode after selecting text. Press u to convert to lowercase, press U to convert to uppercase and backtick ` to toggle case.

Working with lines:

Deleting lines dd or D
Selecting an entire line V

Shortcuts:

Vim is all about mastering the keys that will get you what you want.

folding:

vim folding cheat vim-folding-fun

Plugins:

best of vim

emmet

If you do a lot of html/css work you can’t go wrong with this one. The default trigger keys being <C-y>,

git clone https://github.com/mattn/emmet-vim.git ~/.vim/bundle/vim-easymotion
easy-motion

If the cursor was at the first line and you wanted to move to the 5th word of the 8th line, you would have to move 4j, 8w. With easy-motion you don’t have to do this mental math.

git clone https://github.com/easymotion/vim-easymotion ~/.vim/bundle/vim-easymotion

lightline

I prefer this status bar enhancement plugin compared to airline because it light weight.

git clone https://github.com/itchyny/lightline.vim.git ~/.vim/bundle/lightline

youCompleteMe

Its a fast, as-you-type, fuzzy-search code completion engine for Vim.

More reading

  1. The best article so far on vim learn vim progressivley
  2. basic vim tips
  3. all the right moves
  4. vim wikia
  5. vim casts
  6. getting other editors to act like vim
  7. best vim navigation tutorial
  8. writing-my-own-vim-plugin-manager
  9. usevim
  10. vim as IDE
  11. lococast vim

End of story