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

Re: vi question

Expand Messages
  • gumnos (Tim Chase)
    ... While the others offered temporary solutions, if you don t want your searches to be highlighted at all, you can set the option (either in an editing
    Message 1 of 4 , Mar 2, 2004
    • 0 Attachment
      > I have a question regarding your tuitorial on the text
      > editor vi. I must have accidentally typed something,
      > because now whenever I run vi, the number one is
      > highlighted when I type it. No other character does
      > this. Any ideas on what could be causing this?

      While the others offered temporary solutions, if you don't want your
      searches to be highlighted at all, you can set the option (either in an
      editing session, or in your vimrc file.

      To disable it for just the current search, use what was suggested:

      :noh

      To disable it for the entire editing session, use:

      :set nohls

      To disable it on a long-term basis, put the line

      set nohls

      in your vimrc file. You can read more in the help at

      :help :nohlsearch
      :help 'hlsearch'

      which should get you pointed in the right direction. Also, if you want
      the highlighted searching, but don't want it to preserve across editing
      sessions, you can prevent it from being saved in your viminfo file, by
      adding "h" to your viminfo setting

      :set viminfo+=h

      and possibly (to prevent search history from carrying over)

      :set viminfo+=/0

      (should do it)...more help can be found at

      :help 'viminfo'

      Hope this helps,

      -tim
    Your message has been successfully submitted and would be delivered to recipients shortly.