Traversing text in Insert mode

后端 未结 12 1303
逝去的感伤
逝去的感伤 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:44

    You could use imap to map any key in insert mode to one of the cursor keys. Like so:

    imap h 
    

    Now h works like in normal mode, moving the cursor. (Mapping h in this way is obviously a bad choice)

    Having said that I do not think the standard way of moving around in text using VIM is "not productive". There are lots of very powerful ways of traversing the text in normal mode (like using w and b, or / and ?, or f and F, etc.)

提交回复
热议问题