SourceFormatX

Overview

Features

Why Use It

Formatting Show

Integration

Screenshots

Documentation

FAQs & Tips

Update History

Award Gallery

Testimonials

License Policy

CodeMorph

CodeToHtml

Integrate SourceFormatX Into Visual Studio .NET


Format Source Code within Microsoft Visual Studio .NET

The following instructions allow you to format and indent the current open source code file in Visual Studio .NET using SourceFormatX code formatter command line tool. We used Visual Studio .NET version 2005, 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 within Visual Studio .NET

1. Click "Tools" -> "External Tools".

2. In the "External Tools" dialog box, choose "Add", and enter "SourceFormatX" for the menu option in the Title box.

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:          $(ItemPath)
  • Initial directory:    $(TargetDir)

6. Click "OK" to save settings.

  Add a keymapping so you can invoke SourceFormatX using Ctrl+Alt+T

1. On the "Tools" menu, choose "Options".

2. Choose "Keyboard" from the "Environment" page.

3. In the "Show commands containing" list, type "Tools".

4. In the "Command names" list, scroll to the "External Command 1" entry.

5. Place the cursor in the "Press shortcut keys" text box, and then press Ctrl+Alt+T to assign it to SourceFormatX.

6. Choose "Add", then click "OK" to save settings.

  You may now invoke the command line tool of SourceFormatX code formatter by two ways:

1. Using Ctrl+Alt+T.

2. By clicking "Tools" -> "SourceFormatX".

  Don't waste time on formatting C/C++ source code manually any more!  Download SourceFormatX to Format and Indent Code Now!