如何使用 vim-latex 禁用 vim 中的代码折叠?
我已经尝试了通常的方法,并阅读了 :help tex.vim (参见:http://vimdoc.sourceforge.net/htmldoc/syntax.html)
我简单地浏览了syntax/tex.vim,但不知道如何在不重建vim而不折叠的情况下禁用它。我厌倦了按“zE”。
我在 .vimrc 中尝试过的行:
set foldlevel=manual
set foldlevelstart=99
let g:tex_fold_enabled=0
I have tried the usual approaches, and have read :help tex.vim
(see : http://vimdoc.sourceforge.net/htmldoc/syntax.html )
I've taken a brief look at syntax/tex.vim, but can't see how to disable it without rebuilding vim without folding. I'm sick of hitting 'zE'.
Lines I've tried in my .vimrc:
set foldlevel=manual
set foldlevelstart=99
let g:tex_fold_enabled=0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
刚刚注意到 vim-latex-suite 中有一些变量可以控制折叠,至少从插件的 v1.6 开始是这样。该功能记录如下:
http://vim-latex.sourceforge.net/documentation/latex -suite.html#latex-folding
简而言之,您应该能够更改三个全局变量以消除所有折叠:
这应该消除所有折叠。如果您想禁用某些折叠但不是全部,那么您可以通过为每个变量设置适当的值来控制,如上面的文档链接中所述。希望有帮助。
Just noticed that there are variables to control folding in vim-latex-suite, at least as of v1.6 of the plugin. The functionality is documented here:
http://vim-latex.sourceforge.net/documentation/latex-suite.html#latex-folding
In short you should be able to change three global variables to get rid of all folding:
That should get rid of all folding. If you want to disable some folding but not all then you can control things by setting the appropriate values for each variable, as described in the documentation link above. Hope that helps.
怎么样
What about
折叠功能似乎都位于 Latex-suite 发行版的folding.vim 文件中。该文件在 ftplugin 文件夹的 Latex-suite 文件夹中的 main.vim 文件的第 825 行中引用。该行内容为:
注释掉该行,据我所知,它删除了 Latex-suite 插件中的所有折叠。我认为这不会影响其他任何事情,但我没有检查过。
The folding functionality all seems to located in folding.vim file of latex-suite distribution. This file is referenced in line 825 of my main.vim file in the latex-suite folder of the ftplugin folder. That line reads:
Comment out that line and, as far as I can tell, it strips out all the folding in latex-suite plugin. I don't think it affects anything else, but I haven't checked.