Tuesday, May 27, 2014

VIM plugins and vimrc add-ons

1. Highlight word under cursor without searching.

Vim can easily highlight all search pattern matches and search for the current word (the word under the cursor).
The following describes how can highlight all occurrences of the current word without searching.
  A plugin for listing tags in source code file. Tag can be your imports, class names, function.
  Its like the Eclipse outline view.

  Dependencies
exuberant-ctags : sudo apt-get install exuberant-ctags

  Toggle the sidebar for tag on/off
:TagbarToggle

or you can map a keyboard key like F8 to toggle sidebar
nmap <F8> :TagbarToggle<CR>

  Installing using pathogen
cd ~/.vim/bundle
git clone git://github.com/majutsushi/tagbar