Vim Tips of the Day

February 1, 2009

linux

Re-selection of a visual

When you use control-v or shift-v in vim to do a visual selection and then use (for instance) y to copy the selected text, you loose the selection.

More often than not you want to do another thing with the selection you just had. How?

gv

Copy to clipboard

Make a selection and use

"*yy

Now the selection is ‘under your mouse’. If think I’m going to bind this sequence to something more easy, like *Y.

None