Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Vim, I'd like to go back a word. The opposite of `w`

Tags:

vim

When you're using vim, you can move forward word by word with w. How do I go backwards?

like image 540
joslinm Avatar asked Oct 16 '22 06:10

joslinm


People also ask

How do you go back a word in Vim?

Press w (“word”) to move the cursor to the right one word at a time. Press b (“back”) to move the cursor to the left one word at a time. Press W or B to move the cursor past the adjacent punctuation to the next or previous blank space. Press e (“end”) to move the cursor to the last character of the current word.

What does W mean in Vim?

:w - Saves the file you are working on. :w [filename] - Allows you to save your file with the name you've defined. :wq - Save your file and close Vim.


1 Answers

Use b to go back a word.

You may also want to check out W and B to advance/go back a WORD (which consists of a sequence of non-blank characters separated with white space, according to :h WORD).

like image 325
gefei Avatar answered Oct 18 '22 19:10

gefei