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 中的代码折叠选项,我偶然发现了这个 stack-overflow question。虽然我已经能够将它放入我vimrc的 ,但我遇到的问题是它不会折叠函数上方的多行注释。我该如何解决这个问题?
vimrc
默认syntax/c.vim提供折叠定义。除非您定义c_no_comment_fold变量,否则这也会折叠多行注释。
syntax/c.vim
c_no_comment_fold
要激活它,只需输入
:setlocal foldmethod=syntax
进入~/.vim/after/ftplugin/c.vim.
~/.vim/after/ftplugin/c.vim