Cas*_*bel 16
看起来你正在寻找折叠.基本上你需要开始的只有:
set foldmethod=syntax
set foldcolumn=<n> " the number of columns to use for folding display at the left
Run Code Online (Sandbox Code Playgroud)
并用鼠标操纵它,set mouse=a打开鼠标的东西.该+和-打开/关闭折叠的代码左侧出现在折叠列,旁边的行号,不能直接作为你绘制,但它应该是足够好!您可能希望列宽至少为一对,因此您可以看到超出第一级的折叠.
这取决于为您当前正在编辑的文件类型的语法定义的折叠.Vim为C等常见事物提供折叠规则,但不是一切.如果它没有与vim一起发售,有人可能会创建它,你可以在那里找到适合你的东西.