AStyle Extension


An extension for Artistic Style.

(21) Review
Visual Studio
2015, 2013, 2012, 2010
Download (37,564)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (21)
Q and A (23)
Sign in to write a review
Sort by:

by Willie Stoke | March 30 2016

by 夹克 | February 23 2016

An important extension,Thank you.

by Enokin Skyworker | January 21 2016

Охуенный плагин. Must Have бля)

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


1 - 20 of 21 Items   
Sign in to start a discussion

  • Apply to all files
    3 Posts | Last post July 03, 2016
    • 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.
    • You are right, it would be a useful feature. I'll look into it.
    • I second this feature request. It would be great to bring entire projects up to snuff in a few clicks.
  • Format control at project level
    1 Posts | Last post March 30, 2016
    • While working on big project, it's pretty usual to have to work and modify libraries from different sources, using different coding styles. It would be very useful to have the possibility to choose per project from a list of pre-defined style, which could be registered as now in the "Options" dialog. And also to be able to choose per project if we want "style on save" enable or not. Would this make sense?  
  • would you please add lineend=linux support.
    4 Posts | Last post February 25, 2016
    • since it's so important!!!
    • Lineend is a non-formatting option only available for the command line version of Artistic Style. This extension uses Artistic Style as a static library.
    • What does the default option of "Lineend" in this Extension ?
      I found that --suffix=none  is not support now, would you pls tell me the default option of "suffix"?
    • This extension uses Artistic Style as a static library; therefore, these options are not available and have no default values.
  • Exclude operator from padding option
    2 Posts | Last post August 25, 2015
    • Hello,
      I must say it's really, really useful extension. I found the operator padding function especially useful in Atmel Studio, as it's not being done by the default code formatting.
      I wonder if it is possible to disable padding for particular operators - "<<" and ">>"
      I got used to see it like 'not-separated': (1<<COM00)
      Thanks in advance for answer :) 
    • You should ask this question from the authors of Artistic Style.
  • 'lineend' and 'verbose' not working
    2 Posts | Last post August 17, 2015
    • ... at least here on Win8 VS2013 prof.:
      130: Invalid Artistic Style options:
      These options are also not in the configuration dialog and even the short forms are not honored. So, they seem to be missing at all.
      --lineend in particular is important for cross-platform collaboration and saves a lot of hassle campared with handling at version control level or otherwise. Please add.
    • These non-formatting options are only available for the command line version of Artistic Style. This extension uses Artistic Style as a static library.
  • 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.
  • 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;
         case  value2 :
               <code indented;
      Is it possible?
    • 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:
    • 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.
      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
1 - 10 of 23 Items