Ask HN: What do you use for clearing search highlighting in vim? 1 points by delwin 14y ago ↗ HN Sometimes I write notes to myself like "/why are you working at this hour, go to sleep already"
[–] gharbad 14y ago ↗ Knowing the people I work with, a comment like that might actually exist in the code..Typically I use /^$^I believe the proper way to do it is :noh [–] delwin 14y ago ↗ Aha! Didn't know there was dedicated command for it.
[–] eof 14y ago ↗ i used do similar; but not the notes; just random banging followed by an enter/escape. /daljfdlkja <enter><escape> now i don't use highlighting by defaultfrom: http://vim.wikia.com/wiki/Highlight_all_search_pattern_match... " Press Space to turn off highlighting and clear any message already displayed. :nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
5 comments
[ 2.8 ms ] story [ 12.1 ms ] threadTypically I use /^$^
I believe the proper way to do it is :noh
from: http://vim.wikia.com/wiki/Highlight_all_search_pattern_match...