Forum Moderators: bakedjake

Message Too Old, No Replies

silly question about the vi editor

how do i remove highlighting after a search?

         

jamie

10:08 am on Mar 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

i am quite embarassed to ask this 'cos i reckon it is a really simple matter ;-)

but once i have searched for a pattern in VI this pattern is then highlighted not only in the current file, but also in all subsequent files which i open with VI.

i end up having to search for /zyx, so that it can't find the pattern and therefore does not highlight ;-)

many thanks

littleman

12:49 am on Mar 26, 2003 (gmt 0)



The command to turn off highlights is ':noh', but if you are using vim you can do a key map.
[vim.org...]

bird

1:08 am on Mar 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When I want to get rid of such a selection, what I normally do is to perform a dummy search for a pattern that isn't present in the current file (eg. just as many backslashes as necessary). That way, I don't need to explitily turn highlights on again for the next real search.

jamie

6:57 am on Mar 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



thanks guys :-)