[TUHS] :nohlsearch in vim

Don Hopkins 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.
> YAY!
> 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
>        else
>            set list listchars=tab:>.,trail:>,precedes:<
>        endif
>    endfunction
>    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).
> Chris

More information about the TUHS mailing list