-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:ClangFormat always folds code when run #66
Comments
I noticed that it's hard to maintain folding between the before and the after of formatting. For example, when a formatter found unnecessary However, closing all folds after formatting is annoying as you pointed. I think I can try to implement some heuristics to reduce the problem, although it's not perfect. |
I added code to maintain fold level at cursor line as much as possible in 1cf402c. Please try the latest and check the behavior is what you want. |
I haven't noticed any difference in behavior, but that could easily be due to other settings I have. Do you have an example I can check? |
Is there a way to run the formatter without triggering automatic code folding? Presumably this happens because I have vim setup to fold code when opening a C++ file and
:ClangFormat
reopens the file after it has done its thing. It would be great if vim-clang-format had some way to disable this so as to avoid having to drill down through a bunch of folds.The text was updated successfully, but these errors were encountered: