vim font highlight


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers vim font highlight
# 1  
Old 02-10-2005
vim font highlight

Hi, there. I am using vim to edit some files I am working on from terminal. I occasionally pressed some keys by mistake, and the word just got highlight. Afterward whenever I type in that word, it will be highlight automatically. It is annoying. Could someone tell me how to turn this off?

BTW, using command "syntax off" doesn't solve this problem.

sincerely,

HOUSCOUS
# 2  
Old 02-10-2005
Close that vim window and open again ...
I guess you would have pressed / and that string ...
which is making that string "high lighted".


One more trick : do /string1

where string1 should not be in the file you have opened.
Then "highlight" of the string will go off.

Try that.
# 3  
Old 02-11-2005
I think the following does it as well

:set hls!
# 4  
Old 02-11-2005
Quote:

I think the following does it as well

:set hls!
By doing the above, that vim session is losing the 'highlight' attribute for not only for that perticular string but also for the string we are going to search.
# 5  
Old 02-12-2005
FYI The vim manual suggests this to clear the last-search pattern:

:let @/=''

But I doubt whether I will use it either. It's just too much typing.
# 6  
Old 02-13-2005
Thanx, guys.

However, I used the command "nohl" and it worked. However, I am wondering if other high light has been disable too, since I have used this command?
# 7  
Old 02-13-2005
If you use ":set nohls", you will disable highlighting for all matches from then on, not just clearing the highlighting for the previous match. ":nohlsearch" seems to be a nice choice though.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Highlight text in shell o/p

Hi All, Can anyone tell me how to highlight a particular text in shell output or formattting a text in shell ? (1 Reply)
Discussion started by: prasanna2166
1 Replies

2. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

3. HP-UX

How to highlight syntax in Hp-UX vi editor?

Hi , How do i highlight syntax in vi editor on HP-UX. any suggestion highly appreciated. -Ashok (1 Reply)
Discussion started by: ashokd001
1 Replies

4. UNIX for Dummies Questions & Answers

Font size in VIM

Hello, I use VIM version 7.1.56 on Ubuntu OS. Can you tell me pls how can I change the font-size in VIM? Thanks, Iuli (1 Reply)
Discussion started by: ketchera
1 Replies

5. Solaris

Syntax Highlight editor

Is there is any syntax highlithing editor available for C and C++ programming language in Solaris. (7 Replies)
Discussion started by: arun.viswanath
7 Replies
Login or Register to Ask a Question