integrating artistic style in source insight
TRANSCRIPT
Integrating Artistic Style in Source Insight
Artistic Style
Artistic Style is a source code indenter, formatter, and beautifier for
the C, C++, C# and Java programming languages. It’s open source
software and can be downloaded from the link below
http://sourceforge.net/projects/astyle/files/
Choose AStyle_1.24_windows.zip from the link above and then extract
it anywhere in your PC.
Procedure
1. From the folder \astyle\bin copy the AStyle.exe from and place it
anywhere safe in your computer e.g. D:\Astyle\AStyle.exe
2. Open the Source Insight and go to Options > Custom Commands…
Following Custom Command window will open
3. Click on Add… button
4. Now write down the name of the Command e.g. Artistic Style and
press OK
5. Now press Browse… button
Then provide the path of AStyle.exe. Now it should look like this
6. Now uncheck the box named Pause When Done in the Control Group
Box and Check the box named Iconic Window in the Output Group
Box and it should look like
Now make the path as given below and press Close button.
D:\AStyle\AStyle.exe --style=allman --indent=spaces --indent-
switches --indent-labels --indent-preprocessor %f
NOTE: Find more indentation options @ http://astyle.sourceforge.net/astyle.html
Now go to the Options > Menu Assignments and in the Command
Bar type Custom Cmd: Artistic Style in the right side select Options
from the drop down list under Menu. From Menu Contents click on
Style Properties and Click Insert and then press OK. Finally the
window should look like this
7. Now go to Options > Key Assignments… Type Artistic Style in the
bar under Command: the window will look like this
Now press Assign New Key… button and another message window
will be displayed asking for the key you want to assign for Artistic
Style.
Chose for example CTRL + SHIFT + F pressing this will disappear the
message and now the window will look like
Press OK and you are done. And you can see the embedded command
Example: Suppose the un-indented code below
Press CTRL+SHIFT+F and accept the changes and code will
look like
Save your precious time
By: Muhammad Ismail