In Vim/Vi, how do you move the cursor to the end o

2019-03-07 21:03发布

问题:

In Vim's normal mode:

  • e goes to the end of the next word
  • w goes to the beginning of the next word
  • b goes to the beginning of the previous word

How do you move the cursor to the end of the previous word?

回答1:

Unfortunately it's not a single key... but ge is what you're looking for, I think.



回答2:

Try ge:

ge                      Backward to the end of word [count] |inclusive|.

                                                        *gE*
gE                      Backward to the end of WORD [count] |inclusive|.


回答3:

as seen on VIM manual (section 03.1), you can use ge to go to the end of previous word



标签: vim vi