Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想折叠 vim 上的所有功能。我的代码是用 C 语言编写的。这个怎么做?
PS:这里的功能是不够的!为了更好地考虑,每件事都以 { 开始并以 } 结束。
我认为对于大多数文件类型来说,简单set foldmethod=syntax的.vimrc应该就足够了。检查您是否在/usr/share/vim/vim73/ftplugin/c.vim.
set foldmethod=syntax
.vimrc
/usr/share/vim/vim73/ftplugin/c.vim