Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-03-2007, 11:58 AM   #1
LQ Newbie
Registered: Aug 2007
Posts: 12

Rep: Reputation: 1
Question Accidentally pressed 2 keys - What did I do? How do I undo it?

Running version is Red Hat Enterpise Linux ES release 3 (Taroon Update 8)

I went into VI mode to edit a file. I was scrolling through the file first before going into input mode. I accidentally pressed the SHIFT and 3/# keys (not the keys on the numeric keypad). So it highlighted (in yellow) all instances of a word found in the file. I pressed the combination again hoping that it would undo the action, but it ended up highlighting all instances of the next word. I exited out using ":q!". I went back into the file using VI to see if it was gone, but it wasn't. I exited again. I did a cat command on the file and it didn't show any higlighted text.

So my questions are: What did I do exactly? How can undo this action so that nothing is highlighted?

Thanks in advance for any comments.

Old 08-03-2007, 12:28 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
it's just a highlight taking the current word on the cursor as input, nothing to worry about. it's only still there in vi as vi saves that to it's own config file. the original file is utterly fine.
Old 08-03-2007, 02:13 PM   #3
LQ Newbie
Registered: Aug 2007
Posts: 12

Original Poster
Rep: Reputation: 1
thanks chris! so how can i remove the highlight? is there another combination of keys i can hit to remove it? thanks again.

Old 08-03-2007, 02:15 PM   #4
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Search for something which isn't in the file:
then hit enter, and you're text should appear normal again. I haven't found a more elegant way of doing that though!
Old 08-03-2007, 03:49 PM   #5
LQ Newbie
Registered: Aug 2007
Posts: 12

Original Poster
Rep: Reputation: 1
that did the trick. thanks a lot for the quick replies.

Old 08-05-2007, 09:45 AM   #6
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
do this in command mode within vi :nohl should do the trick.


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
atkbd.c : unknow key pressed wneimeijer SUSE / openSUSE 0 03-16-2006 10:58 AM
Kde shortcuts with more then 2 keys pressed not working cuk Slackware 11 01-25-2006 07:46 AM
Is there anywhere that sells pressed Opensource CDs? dejavu_01 Linux - General 2 10-08-2005 02:11 PM
is certain key pressed at the moment ?? freeborn Programming 4 11-03-2004 03:13 AM
Unknown key pressed Khang Linux - Newbie 3 10-27-2004 04:12 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:43 PM.

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