是否有任何特殊的前提条件需要设置lnoremap(l在这里很重要)?
我有时使用map来交换数字键及其符号(因为符号写得更频繁).我成功地使用noremap并noremap!交换了这些键没有问题.
我注意到映射没有生效f.最近我了解到r并且看到映射也没有生效.在以下的帮助下mapmode-l:
Some commands work both in Insert mode and Command-line mode, some not:
commands: modes: ~
Insert Command-line Lang-Arg ~
:map! :noremap! :unmap! :mapclear! yes yes -
:imap :inoremap :iunmap :imapclear yes - -
:cmap :cnoremap :cunmap :cmapclear - yes -
:lmap :lnoremap :lunmap :lmapclear yes* yes* yes*
Run Code Online (Sandbox Code Playgroud)
然后继续(在language-mapping):
":lmap" defines a mapping that applies to:
- Insert mode
- Command-line mode
- when entering a search pattern
- the argument of the commands that accept a text character, such as "r" and
"f"
- for the input() line
Run Code Online (Sandbox Code Playgroud)
这似乎是完美的映射类型.由于lnoremap被认为也地图插入和命令行,我试图替换noremap!用lnoremap.结果是Lang-Arg,Insert和Command-line都不再具有该映射.
我的问题是,lnoremap在使用之前我需要设置一些特定的东西吗?那些*旁边的东西yes是lnoremap什么?这是否意味着"是"取决于什么?如果是这样的话?
您可以<C-^>在插入模式下打开/关闭语言映射的使用,或通过全局启用它
:set iminsert=1
Run Code Online (Sandbox Code Playgroud)
请参阅:help i_CTRL-^并:help 'iminsert'获取详细说明.切换的原因是某些用户只希望在某些情况下应用语言映射(或特定语言的整体键映射).
对于命令行模式,您还需要
:set imcmdline
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
127 次 |
| 最近记录: |