sheet Vim command: how to select a word under cursor in normal mode
vim undo (3)
I'm looking for a Vim command to select a word under cursor in normal mode, like double-clicking by mouse. Does it exist like this?
viw does a visual select inside the word. Similarly
yiw copies (yanks) the word.
You can use
# to search for the word under the cursor or
viw to visually select the word under the cursor.
Personally, I am prefering
yaw instead of
a indicates around.
On the similar lines. I use
vat to select tag.
v% to select matching closing tag. In some other places
It is making more sense to me as the intention is to select the complete word not inside.
At the end, it all comes down to our personal preference.