VIM Latex-suite插入宏代码而不是执行宏
我有一个问题困扰了我很长一段时间,但我找不到解决方案。
我想使用可以按
并将光标移动到下一个占位符的功能。 这适用于常规文件,但是当我编辑 .tex 文件(即启用了 Latex-suite )时,会插入:
\right=IMAP_Jumpfunc('', 0)
而不是实际跳转(我认为这是通过上面的映射以某种方式完成的)。
常规映射没有问题(我已经让自己像这样:map rhs lhs
),但它不适用于任何乳胶套件宏。其他示例:如果我插入图形(通过菜单),它只会在文本中插入以下内容:
\right=Tex_DoEnvironment(``figure'')
抱歉,我自己无法解决这个问题,这对于有经验的用户来说可能是微不足道的。但我周围没有人可以问。
I have a problem that's been bugging me for quite a while and that I can't find the solution to.
I want to use the feature where I can press <C-j>
and the cursor moves to the next placeholder.
This works for regular files, but when I edit .tex files (i.e. latex-suite is enabled), this inserts:
\right=IMAP_Jumpfunc('', 0)
instead of actually jumping (which I presume is done by the above mapping somehow).
There's no problem with regular mappings (that I've made myself like so: map rhs lhs
), but it doesn't work for any latex-suite macros. Other example: if I insert figure (via menu), it just inserts the following inside the text:
\right=Tex_DoEnvironment(``figure'')
Sorry I can't solve this problem myself, which is probably trivial for an experienced user. But I have no-one around to ask.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来您忘记了调用该函数之前的
=
。编辑:我想我明白了。一旦安装了 IMAPS,它就会快速寄生在我们所有的映射上。您必须使用 IMAP() 来定义您自己的映射。我有在我的包围系统中执行此操作,以便对 IMAP/LaTeX 套件的存在具有鲁棒性。
Looks like you forgot the
<c-r>=
before the call to the function.EDIT: I think I understand. Whem IMAPS is installed, it quickly parasites all our mappings. You will have to use IMAP() to define you own mappings. I had to do it in my bracketing-system in order to be robust to IMAP/LaTeX-suite presence.
嘎嘎,我发现错误了!
我定义了一个键映射,如下所示:(
用于添加到乳胶中的括号)。然后由预定义的映射调用......这是
一个多么泥潭的
教训:总是注释掉整个或部分设置文件,然后看看事情是否开始工作。
Gah, I found the error!
I had defined a key mapping like so:
(for adding to brackets in latex). This was then called by the pre-defined mappings ...
What a quagmire
Lesson taken: always comment-out entire or parts of the settings files, and then see if things start working.