AStyle Extension

Free

An extension for Artistic Style.

(8) Review
Visual Studio
2012, 2010
Download (4,582)
5/8/2013
2.0
View
E-mail Twitter del.icio.us Digg Facebook
Add To Favorites
Description
Reviews (8)
Q and A (7)
Sign in to Write a Review
Sort By:

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


  • The latest version broke this extension's main functionality
    3 Posts | Last Post May 08, 2013
    • Screenshot of error:
      http://i.imgur.com/NfnY0Oe.png
      
      I believe it ships a bad dll version of AStyle that relies on MSVCP110.dll which most users don't have yet:
      158 KB (162 304 bytes)
      0: <All Modules>	Valid: 	Delay: 
      1: MSVCP110.dll	Valid: No	Delay: No
      2: MSVCR110.dll	Valid: No	Delay: No
      3: KERNEL32.dll	Valid: Yes	Delay: No
      Total References: 4
      Invalid References: 2
      
      I built the latest AStyle.dll for myself in VS2010 and that got it back in working order (uses MSVCP100.dll now):
      157 KB (160 768 bytes)
      0: <All Modules>	Valid: 	Delay: 
      1: MSVCP100.dll	Valid: Yes	Delay: No
      2: MSVCR100.dll	Valid: Yes	Delay: No
      3: KERNEL32.dll	Valid: Yes	Delay: No
      Total References: 4
      Invalid References: 0
      
      Sincerely,
      Daniel "3ICE" Berezvai
      
      p.s.: I still want editable command line switches. I use the same settings for C++ and C#, but copying them over checkbox by checkbox is not comfortable work.
    • First time I ever try to use AStyle, getting this error as well. Not satisfactory.
    • Version 2.0 removes the dependencies and also adds an option to directly edit the command line.
  • Latest version (2.03) not available as extension?
    5 Posts | Last Post April 26, 2013
    • Hi all,
       AStyle's project page has the latest version 2.03 available as a stand-alone executable, whereas this MSDN gallery has only version 1.6 (imported as a .vsix extension). The problem with the stand-alone executable is that it is not very elegant to use (modifies the file outside VS and VS prompts if file is to be reloaded; also no UI to customize format option). Is it possible to import the latest version as an extension here? Or is it possible to build a .vsix from source code? Any pointers on how to do this?
    • The extension currently bundles Artistic Style 2.02.1. I will update it to the new version soon. 
    • I see you have an interface that converts to command line arguments. Wouldn't it be better to allow people to add their own command line arguments? That way they could use any version of AStyle they want.
    • I am not against providing a way to edit the command line options, but I do not really see the point of it as long as the UI covers all possible options. Can you please give me an example where it would be useful?
    • I am thinking of people wanting to use the latest version and having to wait for you to update it. 
      
      If a command line option is available, they wouldn't have to wait to use the latest version of AStyle. They can drop the AStyle.dll in as per your instructions below.
      
      Another advantage that comes to mind, is they can back up their command line settings, to a text file for safe keeping.
      
  • C++11 range-based for
    4 Posts | Last Post March 07, 2013
    • Firstly, thanks for a great extension. That said, it seems to have issues with the range-based for loop in c++11, incorrectly outdenting the for.
      this:
      int main()
      {
          for ( auto v : vs )
          {
              cout << v << endl;
          }
      }
      becomes this:
      int main()
      {
      for ( auto v : vs )
          {
              cout << v << endl;
          }
      }
    • There's a bug report over at Astyle, says the issue is fixed in svn so I presume the fix will find its way into the extension eventually.
      
      http://sourceforge.net/tracker/index.php?func=detail&aid=3458402&group_id=2319&atid=102319
    • I'd rather not include a beta version of Artistic Style in the extension. However, you can replace the dll that comes with the extension. In case of VS2010, it is located at
      %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Lukamicoder\AStyle Extension\1.5\AStyle
    • Thanks.
      I replaced the bundled dll with one built from svn (2.03 beta) and now everything works as expected.
  • Custom command line switches (feature request)
    2 Posts | Last Post February 19, 2013
    • Please let us specify custom command line switches.
      I am dying to add the undocumented "space after comma" AStyle option but can't, because there is no GUI checkbox option for it in this extension.
      This could be solved if the command line was editable or supplementable with our own amendments.
    • Can you please list those features missing from the GUI? Also, what is the command line option for that undocumented "space after comma" feature?  
  • Lost bookmarks in VS2012?
    2 Posts | Last Post January 02, 2013
    • Never used VS studios before, Netbeans/vim for c++ on Linux.
      When I format my bookmarks set themselves to the last line of the file the anybody experienced this problem?
    • I am unable to reproduce this problem. Can you please provide more information about this issue (Visual Studio version, project type, file type, etc.) at the project's website: http://code.google.com/p/astyle-extension?
  • No style=ansi option?
    2 Posts | Last Post April 08, 2012
    • No style=ansi option?
    • According to Artistic Style documentation, Allman is equivalent to ANSI.
  • Can you add a preview in the UI ?
    2 Posts | Last Post April 02, 2012
    • Thank you.
    • Currently I have no plans to add additional features.