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. Danny |
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.
|
thanks chris! so how can i remove the highlight? is there another combination of keys i can hit to remove it? thanks again.
danny |
Search for something which isn't in the file:
Code:
/asfddsa |
that did the trick. thanks a lot for the quick replies.
danny |
do this in command mode within vi :nohl should do the trick.
|
All times are GMT -5. The time now is 06:43 AM. |