Just like the title, sometimes when I finish typing the brackets, I need to move the cursor. If I use arrows to move it, it will be farther away from my hand, which is a bit troublesome. But if I press Esc first, I can return to the normal mode. If so, there are many buttons to press. Is there a button that is in normal mode when pressed and in insert mode when raised?
Is there any?
Or is there a way to quickly switch?
CTRL+O can temporarily enter normal mode, and it will automatically return to insert mode after pressing a command. I don't know if it meets your requirements.
A funny thing I saw a long time ago:
Github portal: https://github.com/alevchuk/vim-clutch
//I’m just here for entertainment~
Unfortunately, this is the usage pattern of Vim, just get used to it. Moreover, after pressing
Esc
回到Normal mode后移动光标有很多命令可以选择,没必要一个一个h
,j
,k
,l
地连着按,最简单的,比如15h
会回移15个字符,^w
会删掉上次个单词,b
前移一个单词,等等太多了。你习惯用这些命令后,就会发现按Esc
to return to Normal Mode, moving the cursor is much more efficient than moving up, down, left, and right again and again in Insert Mode.Add these commands under the configuration file:
inoremap <C-h> <Left>
inoremap <C-j> <Down>
inoremap <C-k>
inoremap <C- l> <Right>
That’s it, but it also sacrifices some default functions
Don’t you think it’s emacs? Press ctrl to change the mode~
It is recommended to map ctrl-f and ctrl-b to move left and right, ctrl-c to <Esc>, it’s okay if you don’t need i_ctrl-c,
Insert You can think about the ctrl key combination in mode.
There are useful plug-ins for bracket completion, such as delimitMate, etc.