Loading ...
Sorry, an error occurred while loading the content.

Re: ok, new question on search

Expand Messages
  • A.J.Mechelynck
    ... (with no set ) clears search highlighting until next search. If the 4 characters are to much for you, map it to a key, e.g. ... Best regards, Tony. --
    Message 1 of 9 , Apr 2, 2007
    • 0 Attachment
      Gene Kwiecinski wrote:
      >>> Need to keep the pattern in memory? If not, "/zzz" will do it,
      > assuming
      >>> you don't have "zzz" anywhere else in your file, of course.
      >
      >> The search register can be overwritten by setting @/ to ''. This then
      >> clears your search "properly".
      >> For my purposes, I have the following mapping in my vimrc:
      >> nnoremap <silent> <M-/> :set @/=''<CR>
      >> so pressing alt-/ then clears my search.
      >
      > Yeah, but all those <shift>- and <alt>- stretches on the kb make my
      > fingers hurt... :D
      >

      :noh

      (with no "set") clears search highlighting until next search. If the 4
      characters are to much for you, map it to a key, e.g.

      :map <F12> :noh<CR>
      :imap <F12> <C-O>:noh<CR>


      Best regards,
      Tony.
      --
      What the large print giveth, the small print taketh away.
    Your message has been successfully submitted and would be delivered to recipients shortly.