开发者

Besides F1, F2, F3, (Ctrl + Fs and so on), which are good (available) keys to create custom commands on Vim?

开发者 https://www.devze.com 2022-12-17 03:22 出处:网络
Besides F1, F2, F3, (Ctrl + Fs and so on), which are good (available) keys to create custom commands on Vim?

Besides F1, F2, F3, (Ctrl + Fs and so on), which are good (available) keys to create custom commands on Vim?

Some plugins use , and \. For instance, \be and ,cc. Which are other开发者_开发问答 good available keys to create custom commands on Vim?


I'm a fan of using <Leader> in all my custom maps. That way I can easily avoid stomping on default mappings, and I can quickly change my mapleader whenever I want/need to.


Personally I have remapped my CAPSLOCK as CTRL

and for vim

imap jk <ESC>

The last trick has helped me a lot. I dont have to lift my fingers to get out from normal mode to insert mode.

And it works both ways, jk in normal mode is an innocent combination - move down one, move up one. So by remapping jk as ESC you're not losing out anything.


Since the ESC key is the most used key in vim it beneficial to have it mapped somewhere else.

I've seen others used Ctrl+[, jj, ;; and for a secondary ESC key

imap  jj  <ESC>
imap  ;;  <ESC>
0

精彩评论

暂无评论...
验证码 换一张
取 消