How to move one word left in the vi editor

前端 未结 5 1955
栀梦
栀梦 2021-01-29 17:39

I use the shortcut w to move the cursor one word right. Is there a shortcut to move a word left?

5条回答
  •  不思量自难忘°
    2021-01-29 18:25

    In addition to the b movement mentionned in the other answers, another movement which may be interesting is ge.

    It brings you to the last letter of the word on the left. When b is considered as the opposite of w, ge can be considered as the opposite of e which brings you to the end of the current word.

    Also note that all of those word-wise movement have a WORD-wise equivalent: W, B, E and gE which are "faster". For the difference between words and WORDS see: :h word.

提交回复
热议问题