Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Astyle formatting of all the documents in a folder and create no back up files

Tags:

astyle

I just started using astyle.

  1. Is it possible to run astyle on all the files in a folder ?
  2. If the folder has files with different formats, can it wisely choose C/C++ files alone to format ?
  3. Is it possible to link astyle to gedit so that the programs written from now on are in format ?
  4. Is it possible to not create file.cpp.orig back up file after formatting ?

Thank you!

like image 756
Sai Avatar asked Oct 26 '25 14:10

Sai


1 Answers

  1. Yes, you can do astyle *.cpp and it will run on all cpp files.
  2. See above
  3. Not to gedit, but gedit generally isn't a good program to use when coding. Most IDEs like CodeBlocks have built-in settings to help your code format automatically as you're coding.
  4. Yes it is. Run astyle with --suffix=none or -n
like image 84
Unsolved Cypher Avatar answered Oct 29 '25 19:10

Unsolved Cypher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!