After I visually select the following area enter image description here

And press Esc and move this position enter image description here

I want to be able to select the same shape in this manner enter image description here

If there is no generic and direct way to do this, any tips on how to code a vimscript function for this will also be helpful.

1 Answer 1


Yes, this feature is there, but it's a bit hidden. From :help v:

[count]v            Start Visual mode per character.
                    With [count] select the same number of characters or
                    lines as used for the last Visual operation, but at
                    the current cursor position, multiplied by [count].

So, if you specify a count of 1 (1v), the same number of character as the last selection had is used, but at the current cursor position.

  • This sort of works, but only "saves" the number of characters if you perform a visual operation. If you escape Visual Mode without performing an operation (yank, for example), it does not retain the character count. Sep 30, 2016 at 17:49
  • It works as described by @SirBraneDamuj. Is it possible to get the same functionality without performing an operation as well?
    – vimKoans44
    Oct 1, 2016 at 7:51
  • You could perform a null operation to force the "save". For example "_y Oct 2, 2016 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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