Triple Entendre (triple_entendre) wrote,
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 []  on the vim list.)
" 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
  • Post a new comment


    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