In Vim/Vi, how do you move the cursor to the end of the previous word?

寵の児 提交于 2019-12-04 07:27:37

问题


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



来源:https://stackoverflow.com/questions/5125270/in-vim-vi-how-do-you-move-the-cursor-to-the-end-of-the-previous-word

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!