I'm running Vim 7.2 on Windows 7, and I'm having issues mapping control sequences in insert mode.
I can use :inoremap jl <Esc> while inside vim, and, as expected, typing jl while in insert mode will cause vim to go to normal mode. However, if I put inoremap jl <Esc> in my _vimrc, then type jl inside vim in insert mode, it actually types out <Esc>, which is not what I wanted. I've tried variations with backslashes and whatnot, but those just get ty开发者_JAVA技巧ped out too.
How can I set up my _vimrc to exit to normal mode when I type jl in insert or visual mode?
You should either be in nocompatible mode for <Key> to work, or explicitely specify <special>:
inoremap <special> jl <Esc>
or
set nocompatible " At the very top of vimrc, before any other option
<...>
inoremap jl <Esc>
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论