Traversing text in Insert mode

后端 未结 12 1304
逝去的感伤
逝去的感伤 2020-12-02 03:00

While in Insert Mode in Vim, is there any way to traverse the text moving some characters forward and backward other than using the arrow keys?

If I

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 03:55

    Many people in the Vim community argue that you should not navigate in Insert mode, that it is not the Vim way. I think this is an incorrect sentiment learned when transitioning from standard editors to Vim.

    Vim is most powerful when you use its tools to create atomic, repeatable actions or finds.

    It is ok to navigate while in Insert mode if you are fixing a mistake you made in the same Insert session. You should not navigate outside of the range of text you modified.

    If you make a mistake while entering text and escape out of Insert mode to fix it you will not be able to repeat the intended action, . will repeat the correction.

    Vim does support many Insert mode navigation keys. Obviously there are the arrow keys, Home, and End, but there are also many other shortcuts. See :h ins-special-keys.

提交回复
热议问题