更换 MacVim 中的领导者?
我正在尝试将 MacVim 中的
更改为更少的腕管诱导。我已将此行添加
let mapleader=","
到我的 .gvimrc 中,但“\”仍然是唯一有效的键。我错过了什么吗?
I'm trying to change <Leader>
in MacVim to be something less carpal-tunnel inducing. I have added this line
let mapleader=","
to my .gvimrc, but "\" is still the only key that works. Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该行需要进入正常的
.vimrc
(而不是.gvimrc
)。直到加载所有插件后才会读取 .gvimrc,此时所有映射都已使用默认地图引导程序创建。.gvimrc
仅适用于特定于 GUI 的选项,其他所有内容都应位于.vimrc
中。The line needs to go into your normal
.vimrc
(instead of.gvimrc
)..gvimrc
is not read until all plugins have been loaded, by which time all the mappings have already been created with the default map leader..gvimrc
is intended only for GUI-specific options, everything else should be in.vimrc
.我使用 macvim,它似乎使用 .vimrc 我也将领导者映射到该角色。
I use macvim and it does seem to use the .vimrc I also have leader mapped to that character.
如果您使用一些脚本来自定义 vim,您可以尝试将
let mapleader=","
放入您的~/.vimrc.before
文件中。至少这对我有用。If you are using some scripts to customise your vim you may try to put the
let mapleader=","
in your~/.vimrc.before
file. At least this did the trick for me.