Difference between revisions of "Source Code Formatter plugin"
m (New page: aa) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category:Code::Blocks Core Plugins]] | |
+ | {{Infobox_Plugin| | ||
+ | name = AStylePlugin | | ||
+ | logo = [[File:Astyle-plugin.png]] | | ||
+ | developer = Yiannis Mandravellos | | ||
+ | maintainer = Ceniza| | ||
+ | version = 1.2 | ||
+ | }} | ||
+ | |||
+ | '''AStylePlugin''' uses [http://astyle.sourceforge.net/ AStyle] 1.22 to reformat source files. Artistic Style is a source code indenter, source code formatter, and source code beautifier for the C, C++, C# programming languages. It can be used to select different styles of coding rules within Code::Blocks. | ||
+ | |||
+ | When indenting source code, we as programmers have a tendency to use both spaces and tab characters to create the wanted indentation. Moreover, some editors by default insert spaces instead of tabs when pressing the tab key, and other editors have the ability to prettify lines by automatically setting up the white space before the code on the line, possibly inserting spaces in a code that up to now used only tabs for indentation. | ||
+ | |||
+ | Since the number of space characters shown on screen for each tab character in the source code changes between editors, one of the standard problems programmers are facing when moving from one editor to another is that code containing both spaces and tabs that was up to now perfectly indented, suddenly becomes a mess to look at when changing to another editor. Even if you as a programmer take care to ''only'' use spaces or tabs, looking at other people’s source code can still be problematic. | ||
+ | |||
+ | To address this problem, Artistic Style was created - a filter written in C++ that automatically re-indents and re-formats C / C++ / C# source files. When copying code, for example from the internet or a manual, this code will automatically be adapted to the coding rules in Code::Blocks. Also, individual files or projects can be run through AStyle. |
Latest revision as of 21:56, 28 August 2011
AStylePlugin uses AStyle 1.22 to reformat source files. Artistic Style is a source code indenter, source code formatter, and source code beautifier for the C, C++, C# programming languages. It can be used to select different styles of coding rules within Code::Blocks.
When indenting source code, we as programmers have a tendency to use both spaces and tab characters to create the wanted indentation. Moreover, some editors by default insert spaces instead of tabs when pressing the tab key, and other editors have the ability to prettify lines by automatically setting up the white space before the code on the line, possibly inserting spaces in a code that up to now used only tabs for indentation.
Since the number of space characters shown on screen for each tab character in the source code changes between editors, one of the standard problems programmers are facing when moving from one editor to another is that code containing both spaces and tabs that was up to now perfectly indented, suddenly becomes a mess to look at when changing to another editor. Even if you as a programmer take care to only use spaces or tabs, looking at other people’s source code can still be problematic.
To address this problem, Artistic Style was created - a filter written in C++ that automatically re-indents and re-formats C / C++ / C# source files. When copying code, for example from the internet or a manual, this code will automatically be adapted to the coding rules in Code::Blocks. Also, individual files or projects can be run through AStyle.