【发布时间】:2013-02-08 15:44:17
【问题描述】:
我在 Vim 中编写 C# 代码,我希望能够同时折叠两者
+---- 3 lines: void SomeFunction()-----------------------------------------------
还有
+---- 42 lines: #region The Answer To Life---------------------------------------
但是,foldmarker 必须是文字字符串。我被引导到foldmethod=syntax 的想法,但这在 Vim 7.3 中不能开箱即用。
除了将 fold 方法设置为手动并编写脚本之外,我该如何实现呢?
【问题讨论】:
-
会this page 帮忙吗?
-
but this doesn't work out of the box in Vim 7.3.这是什么意思?如果你可以折叠文本,你用+folding编译你的vim。你可以使用foldmethod=syntax -
与
foldmethod=syntax,当我进入{ }并点击zc关闭折叠时,它不会关闭任何东西。