需要澄清 vim 主键
//mapping1
tnoremap <Esc> <C-\\> <C-n>
// mapping2
let localleader = "\\"
tnoremap <Esc> C<localleader> <C-n>
我尝试通过用 localleader 替换 '\' 来修改上面的映射;
但它只是在终端中打印 C\ ^N 。谁能帮我找出错误吗?
//mapping1
tnoremap <Esc> <C-\\> <C-n>
// mapping2
let localleader = "\\"
tnoremap <Esc> C<localleader> <C-n>
I tried to modify the above mapping by replacing '\' by a localleader;
But it just prints C\ ^N in the terminal. Can anyone help me to find the mistake?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据命令
访问的VIM的文档:help localleader
,您应该将“ \\”分配给maplocalleader
变量,例如:According to VIM's documentation accessed by the command
:help localleader
, you should assign the "\\" to amaplocalleader
variable, such as: