[TUHS] :nohlsearch in vim
don at DonHopkins.com
Thu Nov 16 12:44:48 AEST 2017
Hey Chris, do you remember the story about why Morris’s worm wasn’t able to break into UMD’s machines through the finger daemon? ;)
Do you still have the logs…?
> On 15 Nov 2017, at 23:42, Chris Torek <torek at elf.torek.net> wrote:
>> `:noh' turns off the highlighting of the current matches.
> I've been using Arthur Krewat's method, basically /asdf<CR>,
> for a long time now. Now I have:
> map <Leader><Leader> :nohlsearch<CR>
> in my .vimrc (<Leader> is backslash, so after /foo<CR>, \\ turns
> off the highlighting).
> One other really useful thing, given issues with tabs vs spaces,
> that I'll share here, comes just before this new entry:
> function! ToggleTabs()
> if &list
> set nolist
> set list listchars=tab:>.,trail:>,precedes:<
> map <Leader>t :call ToggleTabs()<CR>
> With this, \t makes tabs visible, or invisible if they are
> currently visible. Despite the name it also highlights trailing
> whitespace (the highlight is a bit subtle though).
More information about the TUHS