Reputation: 63042
Is there any way to achieve that remapping? I looked a bit into
map
and
inoremap
but they appear to affect within a given mode, not how to enter a given mode.
Upvotes: 3
Views: 464
Reputation: 5537
You could use nmap
, e.g.,
:nmap ; :
to map semicolon to colon. The 'n' in nmap
indicates normal mode.
If you wanted to use, say, the <F2>
function key to enter command-line mode from insert mode, you can do:
:imap <F2> <Esc>:
There's an exhaustive 3-part tutorial about key mappings in vim here.
Upvotes: 4