AStyle Extension

Free

An extension for Artistic Style.

(18) Review
Visual Studio
2015, 2013, 2012, 2010
Download (25,825)
6/27/2015
2.6
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (18)
Q and A (19)
Sign in to write a review
Sort by:

by Søren Pingel Dalsgaard | June 24 2015

Extremely useful extension.

Error checking is not good enough (it is easy to crash the extension (and visual studio)).

Missing "--options=<file>" is a major annoyance!

by CFTheDragon | July 16 2014

This plugin is exactly what I needed, a nice easy to use interface to AStyle. Works exactly how I want it. Not a bunch of frilly overhead, perfect.

by Adelost | May 10 2014

Made my life a lot easier.

by Mister Branch | November 13 2013

Exactly what I needed!

by SamuelMarks | November 05 2013

Thanks, much better than the old "AStyle" in external tools which I was using… that "Format on Save" option is perfect!

Easy to use and QUICK tool that does some automated 'stupid' tasks, so you don't have to do them. With the 'Format on save' option this tool now silently but efficiently improves the readability of the code.

by Predelnik | October 11 2013

Very useful, even though some features still could be added.

by Eifelzwerg | September 18 2013

Works very reliable. Great tool to fix up unreadable legacy code. My only wish would be an option to run a whole solution or at least project through astyle.

by mtommy | August 28 2013

Just what I needed!

by Farova | June 01 2013

Wonderful plug in. Works perfectly! Thank you very much for this, it has saved me lots of time I would have spent formatting my code. And the large amount of options allow me to match exactly the style of formatting I like to use.

Highly recommended to everyone!

by dbcfd | May 14 2013

Very easy installation and setup with VS2012. Had previously used the command line version, and the plugin is even easier to use, with all of the functionality.

I only wish there was a way to format all open documents, all in project, etc, but I think that may be a limitation of Visual Studio.

by catus | April 27 2013

Really useful one. But I'd love to have export/import settings so we can synchronize between our team members.

by 3ICE | February 17 2013

Works as advertised, but is slightly feature-poor. (Some AStyle features are missing from the GUI, with no ability to add them ourselves. See Q&A #4)

Recommendations for new users:
• Check the boxes you need. By default all checkboxes are off, so this tool does nothing. Some may see this as an advantage, others as an inconvenience.
(Tools → Options → AStyle Formatter → General → Settings)

• Add a shortcut key for it. By default this tool is invoked from the menu (Edit → Advanced → Format Document AStyle). Add a hotkey for and it'll be more convenient.
(Tools → Options → Environment → Keyboard → Edit.FormatDocumentAStyle)

by THERAOT | October 11 2012

Saves the day!

by casterle | October 02 2012

Thank you so much!

by Gravity-Well | September 19 2012

Excellent work!

by SetoKaiba | April 07 2012

Great!

by Aybe One | April 01 2012

Very good !!!

Thanks

Sign in to start a discussion


  • Where is "--options="
    2 Posts | Last post June 25, 2015
    • We need to make sure everybody uses the same options, so we put the options inside a file.
      
      While this extension is really nice, it's falls short when it wants to decide what is a correct option and what is not.
      
      If I EDIT the options by hand, these options should simply be passed to astyle.exe.
      
      BUG: Try using EDIT to enter this option "--indent=spaces=1". Now press "Settings" and Visual studio will crash hard!
    • --indent=spaces=1 is not a valid option. According to Artistic  Style documentation, the value must be between 2 and 20. Now having said that, the extension shouldn't take down the whole Visual Studio if incorrect values are provided. Will be fixed shortly.
  • Apply to all files
    2 Posts | Last post April 07, 2015
    • Thanks for this great extension, the format on save option is really convenient. But I was wondering if you could take it a step further and provide a menu item (or shortcut) to apply formatting to all files in a project, or even all files in all projects in a solution?
      
      For developers who are working on large solutions with many projects and files, this would be a great way to make everything consistent in one fell swoop. I currently know of no other tool that does this, so adding this feature would put you in the lead.
      
      Thanks.
    • You are right, it would be a useful feature. I'll look into it.
  • Indent code below to case from switch.
    2 Posts | Last post April 07, 2015
    • Hi, 
      
      I am trying to use AStyle tool and I think is it very useful but I want to do something what I don´t know how.
      
      In a "switch/case" code, I want my "case code and break" be indent at same level of case tag.
      
      switch (i)
      {
         case  value1 :
      
               <code indented;
                .....;
                .....;
                break;
               >
             
         case  value2 :
      
               <code indented;
                .....;
                .....;
                break;
               >
      }
      
      Is it possible?
      
      Regards.
      
    • This question should be asked from the authors of Artistic Style.
  • Option to format changed lines only
    4 Posts | Last post October 28, 2014
    • Could you add an option to restrict "format on save" to fragments that have been edited, or added? This is important for code review when working in a team. Currently, examining a reformatted file on SVN, it is hard to tell what lines contain modified code, and which are simply whitespace changes or additional brackets. Visual studio provides information what lines were changed (marks them with a color) and you already have a function to format selection, so it should be relatively easy. What do you think about it?
    • I am not sure what you are asking for. Do you mean that when format on save is applied certain options (such as convert-tab, add-brackets, etc) should be ignored? Why don't you just disable those options then?
    • No. Let's assume that I work on a codebase that is shared with other programmers. Some use formatting tools and some don't. Astyle formats entire file, including lines I didn't change. So, it's impossible for other people to tell what I did because they see changes everywhere. So what I'm asking is an option to restrict Format-on-save only to lines that were changed or added.
    • One of the problems with that approach is that formatting selections only really works on code blocks, such as classes or methods. If only the changed lines are formatted these lines would be formatted out of context. The only way to prevent this is to format the surrounding method or class. This, however, would go beyond the scope of this extension.
  • AStyle GUI is not found
    6 Posts | Last post June 24, 2014
    • VS2012 + WIN7 32BIT, is OK
      VS2012 + WIN7 64BIT, Options → AStyle Formatter is not found, Edit → Advanced → AStyle Format is also not found, AStyle Extension has been installed, version is 2.3, please help me...TOT
    • Try running Devenv.exe /ResetSkipPkgs. More info about it here: http://msdn.microsoft.com/en-us/library/ms241276.aspx
    • I have run the command,and VS2012 has been upgraded to Update4,but the question remains...
      I think this problem may be caused by the 64bit os...@_@
      
    • No, it has nothing to do with the 64 bit OS. That is what I've also been using for years. Try to uninstall the extension from visual studio and then delete the AStyle directory at %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\.  Then reinstall it and see that would fix it.
    • Sorry, I meant %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\
    • Sorry, that isn't AStyle's problem.
      I reinstall AStyle and VS2012 many times,but the problem still exists.
      I spend a lot of time to find the reason.
      Finally, I find that this problem is caused by the Visual Assist X. (Although VAX does not appear to have any problems...)
      AStyle is working properly after I reinstall VAX.
      Thanks for your help.:)
  • Formatting Bug
    2 Posts | Last post April 16, 2014
    • --add-brackets
      
      Currently, AStyle Extension is not adding brackets {} to non-bracketed one line conditionals if the conditional contains a nested conditional.
      
      i.e.
      if (true) if (false) return;
      turns into:
      if (true) if (false) { return; }
      instead of:
      if (true) { if (false) { return; } }
      
      Of all the bugs, this one is the most annoying, as far as annoyances goes.
    • You should report this bug to the authors of Artistic Style at http://sourceforge.net/p/astyle/bugs/
  • svn missing cs project file
    2 Posts | Last post April 09, 2014
    • when i pull out the source from svn and open the .sln file, VS2010 observes the cs project file is missing.  can you add it?  thanks.
    • You need to have the Visual Studio SDK installed to be able to open the project.
  • Need Help With a Problem
    1 Posts | Last post April 07, 2014
    • I am using AStyle on a VS2010 C++ solution with many file extensions including .idl and .inl. 
       
      I do NOT want AStyle to change the .idx, .inl extension files.
      Reason is, under my formatting rules, they are changed in such a way as to make them invalid.
      
      How can I tell AStyle to exclude certain extensions such as these?
      
      Thanks alot!
  • Update to astyle 2.0.4
    2 Posts | Last post November 25, 2013
    • Hi,
      
      That plugins is very useful especially the "format on save".
      However, is it possible to upgrade astyle to 2.0.4 to allow the new options like --attach-namespaces: http://astyle.sourceforge.net/news.html ?
      
      Thx
    • Version 2.3 includes Artistic Style 2.0.4 with all the new options available in the GUI.
  • Load AStyle Formatter Settings on Startup
    2 Posts | Last post November 06, 2013
    • Hi
      
      1) Is it possible to add a option, so that a specific .cfg file (file is stored in the same folder as the solution file) is loaded and used by opening a solution?
      
      2) And is it possible to add this behavior to projects, also, it is possible to add different formatting styles for each project in a solution?
      
      Behelke
    • In that case, you would only edit the current project's or solution's formatting style when you go to the settings. I would also have to add a global settings option. 
      It would be a fairly significant modification for a feature I am not sure how many people would actually use it.
1 - 10 of 19 Items