Return to normal mode without leaving the home bar

I tried vim , and an emphasis on speed and accessibility makes sense for a veteran programmer. I previously used emacs and currently uses a combination of nano , and things like gedit or geany .

I am confused by the need to constantly switch modes, and returning from insert mode to normal mode requires the main line to press Esc . I read this earlier, this key was Tab on some systems where vim was first used, which makes much more sense, but not on current systems where the tab is expected to be involved in smart indentation when encoding.

Returning to normal mode is an operation that you must perform all the time. Is there an alternative key mapping that makes this faster or with comparisons that I just don't know about?

+4
source share
6 answers

You can also use ^ [. If you set up a key to lock your caps for control (highly recommended), this will become a fairly simple keystroke.

+7
source

Ctrl + C also returns you to normal mode

+9
source

I personally use the Capslock key as the second Esc , so it is very convenient. You can do this by adding the following lines to your .xmodmap file:

 remove Lock = Caps_Lock keysym Caps_Lock = Escape 
+3
source

You can display whatever you like:

 imap kj <Esc> 

I have not yet encountered a situation where I need to enter kj next to each other, in addition, when I talk about this comparison. I saw other people use jk or jj, but kj works best for me.

+2
source

I personally use ii to exit insert mode while remaining on the home line, but this is only a matter of personal preference:

inoremap ii <Esc>

i to enter the box and ii to exit. It is easy to remember with your finger. (Although I still use <Esc> )

+1
source

I personally use Left Control as escape and Caps Lock as Left Control. This is not a vim mapping, but some xmodmap + setxkbmap magic:

 ! ~/.Xmodmap ! Control_R keycode 37 = Escape 

and ctrl:nocaps in the parameters of the X-keyboard. However, you may have a different code.

0
source

Source: https://habr.com/ru/post/1337719/


All Articles