6
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

Integrating Artistic Style in Source Insight

Embed Size (px)

Citation preview

Page 1: Integrating Artistic Style in Source Insight

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

Page 2: Integrating Artistic Style in Source Insight

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

Page 3: Integrating Artistic Style in Source Insight

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

Page 4: Integrating Artistic Style in Source Insight

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.

Page 5: Integrating Artistic Style in Source Insight

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

Page 6: Integrating Artistic Style in Source Insight

Press CTRL+SHIFT+F and accept the changes and code will

look like

Save your precious time

By: Muhammad Ismail