LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-08-2004, 01:31 AM   #1
lrt2003
Member
 
Registered: Mar 2004
Distribution: Fedora 10
Posts: 182

Rep: Reputation: 30
Quick VIM question (unhighlighting search terms after search)


When I do a search with /<pattern>, I can't get it to unhighlight the search term after the search. how do you do this?

thnx
 
Old 05-08-2004, 02:41 AM   #2
sakulagi
LQ Newbie
 
Registered: May 2003
Location: China
Posts: 5

Rep: Reputation: 0
I mapped <F5> as a switch:

echo map \<F5\> :set hls\!\<bar\>set hls?\<CR\> >> ~/.vimrc
 
Old 05-08-2004, 02:49 AM   #3
lrt2003
Member
 
Registered: Mar 2004
Distribution: Fedora 10
Posts: 182

Original Poster
Rep: Reputation: 30
thanks that worked, though is there a "normal" option to stop the search and get back to normal, like a built in command that works universally?

Last edited by lrt2003; 05-08-2004 at 02:53 AM.
 
Old 05-08-2004, 09:01 AM   #4
arvind_sv
Member
 
Registered: Oct 2002
Location: Bangalore
Distribution: Gentoo Linux
Posts: 96

Rep: Reputation: 15
Hi,

Try this:

:noh

For more on this:

:help noh

Arvind
 
Old 05-08-2004, 10:28 AM   #5
lrt2003
Member
 
Registered: Mar 2004
Distribution: Fedora 10
Posts: 182

Original Poster
Rep: Reputation: 30
yep works good thanks!
 
Old 05-08-2004, 05:21 PM   #6
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
I use this in my ~/.vimrc to map disable highlighting to Ctrl+N:
Code:
nmap <silent> <C-N> :silent noh<CR>
I think I stole this from the great Tips section on vim.org.


Håkan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vim 'n' lynx: command line option to search for string Samsara Linux - Software 6 01-02-2013 06:36 PM
How can I search a special variable name in vim? faezeh Fedora 2 03-22-2005 06:47 AM
search default: search post title only slackie1000 LQ Suggestions & Feedback 4 03-10-2005 07:50 AM
vim search and replace - split line phreak7t7 Programming 2 08-16-2004 05:02 PM
search terms minimum length okok LQ Suggestions & Feedback 3 02-04-2002 12:22 AM


All times are GMT -5. The time now is 12:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration