I dislike to have to reach up to the Escape key all the time. For a while I used the program xcape under Linux to map Caps lock to be both Control and Escape. However, I am currently working more and more on a Mac so I cant have the same keybinding without much increased effort. I thought that the key combination of Control-Space would be quite nice. I tried to rebind with:map <NUL> <ESC>nmap <NUL> iBut that does not work correctly, often inserting the same text again.
How can I bind Ctrl-Space to be Esc when not in insert mode, and to switch to insert mode otherwise?
key bindings;escape