Timeline for How to automatically turn off "hlsearch" after I'm done searching?
Current License: CC BY-SA 3.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 17, 2023 at 17:45 | history | protected | Martin Tournoij | ||
Mar 17, 2023 at 8:36 | answer | added | Wahyu Nurcahyo | timeline score: 0 | |
Dec 30, 2022 at 11:44 | answer | added | Aiankan | timeline score: 0 | |
Apr 27, 2021 at 18:13 | answer | added | Torkoal | timeline score: 2 | |
Feb 13, 2021 at 1:59 | answer | added | Oleh Baranovskyi | timeline score: 0 | |
Dec 19, 2019 at 19:02 | answer | added | DanG | timeline score: 7 | |
Oct 31, 2019 at 19:31 | answer | added | Darrel Lee | timeline score: -2 | |
Oct 2, 2019 at 17:59 | answer | added | James Affleck | timeline score: 0 | |
Aug 16, 2019 at 8:12 | comment | added | Rolf |
I have set hlsearch as well as nmap <silent> <C-N> :silent noh<CR> in my vimrc. This way, I always get highlighted search and pressing CTRL-n simply removes the highlights (of the last search). It is actually handy to disable highlights manually once you don't need them anymore.
|
|
Jul 3, 2019 at 17:55 | answer | added | Kostas | timeline score: 4 | |
Aug 27, 2017 at 2:38 | answer | added | Jon Parise | timeline score: 14 | |
Jul 13, 2016 at 12:48 | answer | added | Amit Gold | timeline score: 6 | |
Jul 13, 2016 at 10:07 | answer | added | Rich | timeline score: 6 | |
Jul 13, 2016 at 7:07 | comment | added | Sato Katsura |
nnoremap <M-\> :set hlsearch!<CR><Bar>:echo 'hlsearch: ' . ['Off', 'On'][&hlsearch]<CR>
|
|
Jul 12, 2016 at 19:57 | comment | added | Antony |
:nno <BS> :set hls!\|set hls?<CR> -- one line, one keypress, state feedback, and doesn't try to second-guess when you may or may not want highlighting. Sometimes I want highlighting left on the screen when editing. Sometimes I don't, e.g. using / as a motion with an operator.
|
|
Jul 12, 2016 at 17:55 | history | edited | DJMcMayhem | CC BY-SA 3.0 |
added 126 characters in body
|
Jul 12, 2016 at 17:53 | comment | added | Christian Brabandt | Oh and define "done" searching | |
Jul 12, 2016 at 17:18 | comment | added | DJMcMayhem |
@Antony As in, if I'm making edits, or in insert mode, it will turn off without me needing to press any buttons. If I start searching with / or ? , or if I press n or N , it will turn on without me needing to press any more buttons.
|
|
Jul 12, 2016 at 17:16 | comment | added | Antony | Define automatically. | |
S Jul 12, 2016 at 16:52 | answer | added | DJMcMayhem | timeline score: 42 | |
S Jul 12, 2016 at 16:52 | history | asked | DJMcMayhem | CC BY-SA 3.0 |