With other editors we can select vertical-blocks where each line has the same start column but not the same end-column.

For example:

print("", s.field1);
print("", s.field_long);
print("", s.f);

Is there a way in Vim (with a plugin or not) to select the block from the snippet above:


Can we tell vim to select everything up to a certain character?

A more powerful variant could be to tell Vim select everything between two characters going left and right from the currently selected column.

EDIT: Doing tricks with CTRL-v does not work as it always selected a rectangle. Here I vertically selected the fs and then did w for word-skip.

  • 3
    This is not an exact duplicate, but you might be interested by my answer to this question: There are plugins which allows you to do what you want and there is probably a built-in feature which will allow you to do what you want but we would need more details on your final goal to help you efficiently. There is also <C-v>$y that you could use to yank the text you want to use followed by s:/);// to remove the unwanted characters.
    – statox
    Jun 3, 2019 at 15:20
  • I use VSCode, and in insert mode I can do ctrl+shift+down ctrl+right arrow to do this. Mar 20 at 17:31

2 Answers 2


Go to the first letter of the word, and press


that selects the word. You may use


to select e.g. 5 words. Then you do whatever you want, e.g. to copy to clipboard you do

" * y
  • Doesn't work unfortunately. C-v is selecting a rectangle.
    – Patrick B.
    Jul 5, 2019 at 9:53

If memory serves:


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.