Skip to content
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

"Run clang-format on file save" should also format on Save All #16

Open
AndiDog opened this issue Jul 7, 2016 · 6 comments
Open

"Run clang-format on file save" should also format on Save All #16

AndiDog opened this issue Jul 7, 2016 · 6 comments

Comments

@AndiDog
Copy link

AndiDog commented Jul 7, 2016

Ctrl+Shift+S shortcut (Save All) is often used by developers to save all modified files at once. In that case, CppStyle doesn't automatically format the content.

@arnetheduck
Copy link

I'm experiencing this too - it also happens when running Build and automatic Save All before build is enabled.

@wangzw
Copy link
Owner

wangzw commented May 14, 2017

Yes, it is because I do not know how to hook save all/automatic Save event... So any contribution is welcomed.

@Geobert
Copy link

Geobert commented Jan 11, 2018

I have absolutely no knowledge on Eclipse API but I found this, if it can inspire someone:
https://www.eclipse.org/forums/index.php/t/161995/

@shillingsburg
Copy link

I had some luck checking the "Format source code" box in Preferences->C/C++->Editor->Save Actions.

@Geobert
Copy link

Geobert commented Jan 23, 2019

I had some luck checking the "Format source code" box in Preferences->C/C++->Editor->Save Actions.

This work only when you save one file, not when you click "save all"

@jmcarter17
Copy link

#32 Just realize that this is a doublon. Here is what I wrote on #32 :

Hi, we have the same issue. We would like to see that "save all" or ctrl+shift+s (save all) formats the files also, if we have chosen to "Run clang-format on file save".

Also, if we have checked "Save automatically before build" in our workspace settings, it doesn't format on those saves either.

I believe all 3 cases (save-all button, ctrl-shift-s and save before build) are the same problem, but they should all, in my opinion, format the files. They are all "save all" operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants