How to create an alias for a command in Vim?

后端 未结 7 2176
梦毁少年i
梦毁少年i 2020-11-28 02:32

Vim is my preferred text editor when I program, and thus I always run into a particularly annoying issue.

Frequently, when I quickly need to save the buffer and conti

7条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 03:02

    Maybe you would like to map one of your function keys (F1..F12) to :w ? Then put this into your .vimrc:

    noremap   :w
    inoremap  :w
    

    (ctrl-o in insert mode switches temporarily to normal mode).

提交回复
热议问题