vim font highlight


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers vim font highlight
# 1  
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  
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  
I think the following does it as well

:set hls!
# 4  
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  
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  
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  
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.
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #134
Difficulty: Easy
Linus Torvalds is known for disagreeing with other developers strongly and calls himself a 'really unpleasant person'.
True or False?

6 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. Shell Programming and Scripting

Highlight the string displayed

Hi, Want to highlight the string displayed on the screen. ften="File selected" FB1="\e From the above code, String "File selected" gets highlighted, but the string in the next line does not get highlighted. I tried using FB1& FB2 variables but didn't worked out may be due to too... (1 Reply)
Discussion started by: milink
1 Replies

3. 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

4. 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

5. 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

6. 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

Featured Tech Videos