Last Updated: February 25, 2016
·
511
· sheerun

Clear highlighting when pressing Esc in Vim

nnoremap <silent> <Esc> :noh<CR><Esc>
nnoremap <silent> c :nunmap c<CR>

Reference: http://superuser.com/questions/285049/remapping-esc-in-macvim-angers-vim-itself