Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say you're selecting a large region of text using a & i, but you make a mistake and accidentally select too much (say you accidentally type at and select the entire tag you are working in, losing your selections inside the tag).

Is there any way to undo a change in visual selection?

share|improve this question

The extent of the selection is stored in the '<,'> marks when you leave or operate on the selection.

Therefore, to "save" the selection, you'd have to leave and re-enter the selection: <Esc>gv. Then, if you accidentally select something undesired, you could restore the previous selection (within visual mode!) with `>o`<.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .