|
Integrate SourceFormatX Into Visual C++ / Visual Studio |
|
| |
|
|
Format Source Code within Microsoft Visual C++
The following instructions allow you to format and beautify the current open C and C++ source
code files in Visual C++ 6 using the
command line tool of SourceFormatX code formatter &
code beautifier. We used Visual C++ 6 of Visual Studio
6, 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 action that will invoke SourceFormatX code formatter
1. Click "Tools" -> "Customize".
2. In the "Tools" page, click "Add" button, and enter "SourceFormatX".
3. Type an ampersand before one of the letters in the tool name to create an accelerator key for the command when it appears on the Tools menu. For example, if you use "SourceFormat&X", the letter 'x' will be the accelerator key.
4. In the "Command" box, enter the path to SourceFormatX.exe, or choose Browse to navigate to it.
5. Fill in the form as show below: (Assuming you installed SourceFormatX code indenter in C:\Program Files\SourceFormatX\)
- Title: SourceFormat&X
- Command: C:\Program Files\SourceFormatX\SourceFormatX.exe
- Arguments: $(FilePath)
- Initial directory: $(FileDir)
Add a keymapping so you can invoke SourceFormatX using Ctrl+Alt+T
1. In the "Keyboard" page, choose "Tools" in "Category" list box.
2. In the "Commands" list box, type "UserTool1".
3. Place the cursor in the "Press new shortcut key" text box, and then press Ctrl+Alt+T to assign it to SourceFormatX.
4. Click "Assign", then click "Close" to save settings.
You may now invoke SourceFormatX code beautifier's command line tool by two ways:
1. Using Ctrl+Alt+T.
2. By clicking "Tools" -> "SourceFormatX".
Don't waste time on formatting and indenting C/C++ code by hand any more! Use SourceFormatX to format and beautify code now!
|