Vim Tips Wiki
Advertisement

Proposed tip Please edit this page to improve it, or add your comments below (do not use the discussion page).

Please use new tips to discuss whether this page should be a permanent tip, or whether it should be merged to an existing tip.
created June 8, 2009 · complexity basic · author Kursadk · version 7.0

This is a simple setup I use here and I believe it is way easier than using Esc-I combination to go back and forth between modes. This is a toggle based solution. You can go back and forth between Insert and Normal modes via "ctrl+space"

Copy the lines below into your vimrc:

"Normal-Insert Toggle
nnoremap <C-space> i
imap <C-space> <Esc>

Comments

Thanks for suggestion. I have recently done a lot of merging of different ideas into Avoid the escape key so I think it would be better if I also move this to there. JohnBeckett 22:27, 8 June 2009 (UTC)

Sure go ahead please. Kursadk 22:36, 8 June 2009 (UTC)

:nnoremap <C-Space> a is the proper way to do this, if you don't want repeated hitting of <C-Space> to back up one character per repetition. (Spiiph 00:01, 29 July 2009 (UTC))

Advertisement