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.
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)
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.
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?
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.
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
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.
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?