Вопрос

I've been trying to explore code folding options in Vim, and I have stumbled upon this stack-overflow question. While I have been able to put that into my vimrc, the problem I'm having is that it doesn't fold the multi-line comments above a function. How do I solve this?

Это было полезно?

Решение

The default syntax/c.vim provides folding definitions. Unless you define a c_no_comment_fold variable, this also folds multi-line comments.

To activate this, just put

:setlocal foldmethod=syntax

into ~/.vim/after/ftplugin/c.vim.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top