> I want to use ;; instead of <Esc> to return to normal mode. I want ;;
> to work everywhere <Esc> works, e.g. insert mode, command mode, visual
> mode.
>
> So, I did these mappings:
>
> map! ;; <Esc>
> map ;; <Esc>
>
> But in the command mode I am having trouble. For example, if in the
> command I type
>
> :set list;;
>
> It executes the command :set list instead of escaping to normal mode.
> How to fix this?
On the right hand side of a map, escape causes a command-line command
to be accepted. See :help c_<Esc>
To get the behavior that you want, this should do the trick:
noremap ;; <Esc>
noremap! ;; <Esc>
cnoremap ;; <C-c>
~Matt
No comments:
Post a Comment