Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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