Format Source Code within Source Insight
The following instructions allow you to format source code files in Source Insight
using FormatCode command line tool. We used a free trial version of Source Insight Version 3.5,
so if you use an older or even a newer version then several screenshots or menu items may differ from our description.
Add a Tool Menu that will invoke FormatCode
1. Click "Options" -> "Custom Commands...".
2. Click the "Add" button, then input "FormatCode" to add a new tool.
3. Please fill in the form as show below: (Assuming you installed FormatCode in C:\Program Files\FormatCode\)
- Command: FormatCode
- Run: "C:\Program Files\FormatCode\FormatCode.exe" %f
- Dir: C:\Program Files\FormatCode\
4. Click "Menu.." button, scroll the "Command" box to the command "Custom Cmd: FormatCode" you created. Then, insert "FormatCode" menu item to the "Edit" menu, as show below:
5. Click "Keys.." button, scroll the "Command" box to the command "Custom Cmd: FormatCode" you created.
6. Then, click "Assign New Key..." button, assign new key "Ctrl+T" or other keys.
7. Click "OK" to save settings.
You may now invoke FormatCode command line tool by two ways:
1. Using Ctrl+T
2. By clicking "Edit" -> "FormatCode".
With FormatCode Code Formatters, you can format and transform any foreign source code to meet your favourite coding style within Source Insight in several seconds!
|