Triple Entendre (triple_entendre) wrote,
Triple Entendre
triple_entendre

  • Mood:

getting out of vim's crazy-colorful search keyword highlighting in five fewer keystrokes

If you add this to your .vimrc:
" Clears search highlighting by just hitting a return.
" The <BS> clears the command line.
" (From Zdenek Sekera [zs@sgi.com]  on the vim list.)
"  Guido@VanHoecke.org added the final <cr> to restore the standard behaviour of
" <cr> to go to the next line
:nnoremap <CR> :noh<CR>/<BS><CR>
search highlighting will be removed when you next press Enter.

found in the comments of vim Tip #1
Tags: config, tips, vim
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment