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?
To select all in Vim, use ggVG. it allows you to select all in vim of a file's content. To go to normal mode, hit the ESC key first. Then, using the gg keys, we'll jump to the beginning of the file.
Vim Word Navigation b – go to the previous (before) word. B – go to the previous (before) WORD. w – go to the next word. W – go to the next WORD.
Normal mode is where one should spend most of their time while using Vim. Remember, this is what makes Vim different. In normal mode, there are multiple ways to move around an open file. In addition to using the cursor keys to move around, you can use h (left), j (down), k (up), and l (right) to move as well.
You can use *
and/or #
to search for the word under the cursor or viw
to visually select the word under the cursor.
viw
does a visual select inside the word. Similarly yiw
copies (yanks) the word.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With