Last Updated: February 25, 2016
·
2.496K
· abhishek77in

vim: avoid typos

Quickly check for variable across file and avoid typo by pressing * over your variable in normal mode.

make sure you have set hlsearch in your vimrc
or do :set hlsearch in command-line mode

note: * searches forward for the next occurrence of that word, and # searches backwards.

tip: place :nnoremap <CR> :nohlsearch<cr> in your vimrc to remove highlighting on hitting return/enter key