Reputation: 721
By default when I press insert
key, vim switches to the INSERT
mode.
If I press insert
key again, vim switches to the REPLACE
mode.
I want to toggle INSERT/NAVIGATION modes by pressing insert
key.
I.e.: press insert
key -> get INSERT
mode. Press insert
key again -> get back NAVIGATION
mode.
How do I get that?
Upvotes: 1
Views: 212
Reputation: 172510
To change the meaning of the <Insert>
key (that's how it's spelled in Vim's key notation), you define an insert mode mapping. Since you want to leave insert mode, you map the key to <Esc>
, which takes you out of insert mode.
:inoremap <Insert> <Esc>
Upvotes: 5