The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: torek@elf.torek.net (Chris Torek)
Subject: [TUHS] :nohlsearch in vim
Date: Wed, 15 Nov 2017 14:42:31 -0800 (PST)	[thread overview]
Message-ID: <201711152242.vAFMgVDX051762@elf.torek.net> (raw)
In-Reply-To: <20171115221853.E0E0C1F978@orac.inputplus.co.uk>

>`: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


  reply	other threads:[~2017-11-15 22:42 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30 14:16 [TUHS] basic tools / Universal Unix Noel Chiappa
2017-10-30 14:40 ` Clem Cole
2017-10-30 15:23 ` Arthur Krewat
2017-10-30 20:56 ` Dave Horsfall
2017-10-31 10:50   ` Ronald Natalie
2017-11-01  3:23     ` Dave Horsfall
2017-11-01 13:25       ` Tim Bradshaw
2017-11-16  1:17         ` Dario Niedermann
2017-11-15  1:25       ` Nemo
2017-11-15  2:10         ` Will Senn
2017-11-15  2:16           ` Larry McVoy
2017-11-15  2:37             ` Warner Losh
2017-11-15  3:07               ` Will Senn
2017-11-15 16:13                 ` Arthur Krewat
2017-11-15 16:23                   ` Arthur Krewat
2017-11-15 16:48                     ` Clem Cole
2017-11-15 18:13                       ` Bakul Shah
2017-11-15 19:01                         ` Clem Cole
2017-11-15 19:52                           ` [TUHS] TECO was: " Arthur Krewat
2017-11-15 20:19                             ` Clem Cole
2017-11-15 20:25                               ` Arthur Krewat
2017-11-15 22:18                                 ` Ralph Corderoy
2017-11-15 22:42                                   ` Chris Torek [this message]
2017-11-16  2:44                                     ` [TUHS] :nohlsearch in vim Don Hopkins
2017-11-16  4:34                                   ` [TUHS] TECO was: Re: basic tools / Universal Unix Dave Horsfall
2017-11-16  4:36                                     ` Jim Capp
2017-11-16  8:42                                     ` Pete Turnbull
2017-11-18 14:39                                       ` Ralph Corderoy
2017-11-16  9:19                                     ` arnold
2017-11-16 21:59                                     ` Dave Horsfall
2017-11-16 22:58                                       ` Andy Kosela
2017-11-17  2:17                                         ` Steve Johnson
2017-11-17  2:38                                           ` George Michaelson
2017-11-17  3:56                                             ` Ian Zimmerman
2017-11-17  4:07                                               ` Steve Nickolas
2017-11-17  8:44                                             ` Michael Kjörling
2017-11-17  3:50                                         ` Lyndon Nerenberg
2017-11-17  6:51                                           ` Andy Kosela
2017-11-17  1:18                                     ` Greg 'groggy' Lehey
2017-11-16  0:29                                 ` Grant Taylor
2017-11-16  0:35                                   ` Grant Taylor
2017-11-16  0:52                                     ` Warner Losh
2017-11-16  9:29                             ` [TUHS] TECO was: " Mutiny 
2017-11-16 14:55                               ` Clem Cole
2017-11-16 21:26                                 ` Random832
2017-11-17  9:08                                   ` Mutiny 
2017-11-16 20:35                               ` Dave Horsfall
2017-11-16 21:00                                 ` Clem Cole
2017-11-17  6:28                               ` Lars Brinkhoff
2017-11-15  9:58               ` [TUHS] " Andy Kosela
2017-11-15 11:42           ` Ralph Corderoy
2017-11-01 14:05     ` Ralph Corderoy
2017-11-01 16:42       ` arnold
2017-11-01 17:17         ` Ralph Corderoy
2017-11-01 18:03           ` Dan Cross
2017-11-01 18:06           ` arnold
2017-11-01 20:16             ` Bakul Shah
2017-11-01 20:37               ` arnold
2017-11-01 21:04                 ` Bakul Shah
2017-11-02  0:05                 ` Chet Ramey
2017-11-02  0:10             ` Ralph Corderoy
2017-10-31 16:43   ` Don Hopkins
2017-11-02 17:48   ` Paul Winalski
2017-10-30 21:50 ` Charles Anthony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201711152242.vAFMgVDX051762@elf.torek.net \
    --to=torek@elf.torek.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).