All of a sudden all the text in my vi editor is highlighted.I have no idea how this happened. Please help.


Type /asdfjhanlskfh or something similar that starts with a slash.

Chances are you have searched for a character (/.) and are using vim instead of vi.

  • Thank you that worked for me!! But I'm using vi and not vim. It's on Fedora – Pavitar Mar 31 '11 at 12:51
  • 2
    @Pavitar: try vi --version from the command line, or follow the symlinks of `which vi` – MattBianco Mar 31 '11 at 12:54
  • Ohh yea..My vi is set as an alias for vim.thank you. +1 – Pavitar Mar 31 '11 at 13:00

This could be a variety of things. Its most likely because you are visual select mode (which you get to by pressing the 'v' key in command mode). Try pressing Esc twice to see if that gets you out of it. Another clue on this would be that it would say -- VISUAL -- in the status line.

If that's not it, giving us a bit more info would be in order, such as what you were doing at the time, if closing the file and reopening fixes it, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.