Esc
doesn't work for me for obvious reasons. So I started using C-c
but I'm told that's bad practice. In addition it isn't as convenient as I like it to be.
So I looked into binding C-Space
and found this which toggles between insert and normal mode.
:nnoremap <C-@> i
:inoremap <C-@> <Esc>
I guess I can extend this to exiting other modes like visual
to normal
by using :vnoremap
, etc.
This is perfect. The only problem I face is that when pressing C-Space
in insert mode to switch to normal mode, the caret moves back by one position. That's quite annoying.
I also tried the nnoremap <C-Space> i
version but that doesn't work on my system. I'm on an Ubuntu Focal. I read some comment that Ubuntu 14 captures that sequence or some such.
Terminal: Konsole WM: i3
I have also GNOME and KDE Plasma from when I used them.