vim – Quick vim tip

I’ve always used the “w” key to go forward a word when highlighting stuff. There’s a problem with this though when you want to just copy a single word.

Lets say you have the sentence “you are a car.” Let’s also assume you have placed your cursor on the letter “a” in “are.”

And we want to highlight the word “are.” So we press “vw”. When you press the letter “w”, it highlights the following: “are a”. Note that it includes a space and the letter a.

So the letter “w” is the wrong key to use, so what is the key to go to the end of the word instead?

It’s the letter: e

Leave a Reply

You must be logged in to post a comment.