Vim: Fold top level folds only

时间秒杀一切 提交于 2019-12-02 16:37:54

Yes, you can type

:%foldc

Which closes one level of folds (outside in).

I think you want to add set foldnestmax=1 to your $MYVIMRC.

As Karl says, the foldnestmax setting is probably what you want.

zO (i.e., capital-letter-o) opens all nested folds.

I also find zx and zv very helpful.

When I use foldmethod=expr with a custom fold expression, I'll often modify the expression so that it only folds what I want it to fold.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!