更换 MacVim 中的领导者?

发布于 2024-08-04 18:54:44 字数 162 浏览 3 评论 0原文

我正在尝试将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

戈亓 2024-08-11 18:54:44

该行需要进入正常的 .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.

逆蝶 2024-08-11 18:54:44

我使用 macvim,它似乎使用 .vimrc 我也将领导者映射到该角色。

I use macvim and it does seem to use the .vimrc I also have leader mapped to that character.

少女的英雄梦 2024-08-11 18:54:44

如果您使用一些脚本来自定义 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文