If I have the cursor placed on "word1" and wanted to select "word1 word2 word3" (i.e. with no trailing space after "word3") what is the easiest command?
word1 word2 word3 word4
I am currently using
v5iw. Is this easiest command?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
I would go with vf3 (with the cursor at the beginning of the first word) because it doesn't require you to count anything you just have to think "I want to put my cursor in this character".
Anyway I think what you should really read is
:h motion.txt to understand which motion exist and for which range they are useful.
Also asking for the best way to visually select these word might be a XY Problem: There is a good chance that what you want to do would be more efficient without a visual selection (for example
df3 would deleted the words in only 3 keystrokes)