Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 866 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fold C code with vim?

#1
I've been trying to explore code folding options in Vim, and I have stumbled upon this stack-overflow [question][1]. 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?


[1]:

[To see links please register here]

Reply

#2
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`.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through