Vim tricks #1


I've been toying with vim for around 10 years now. My approach to learn it has been slow, getting settings, mappings, plugins and tricks from here and there.

Here are some stuff that i found useful lately:

  • Paste last yanked text with "0p, which is the content of the default register (zero)
  • Indent a visual selection of a text representing a json (requires python, source) putting in your.vimrc this line: map j !python -m json.tool
  • Jump to prev/next class/method definitions:
    • ]] # next class/method
    • [[ # prev class/method