Visual Studio: Add a third-party editor

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
Visual Studio
edit

Visual Studio features a number of specialized editors—Binary Editor, CSS Source Editor, HMTL Editor, Resource Editor, Source Code Editor, XML Editor, etc. But, you may have a personal favorite editor for a particular type of file.

For example, Visual Studio 2005 offers a CSS Source Editor for editing stylesheets (.css). But, you might prefer the TopStyle editor. There is a way that you can use it instead of the default editor.

Create a file

Navigate the View / Solution Explorer menus to open the Solution Explorer. Right click on a project and select Add / New Item… from the popup-up menu. This opens the Add New Item Dialog Box:



Figure: Visual Studio Add New Item Dialog Box


Click on the file type you wish to create. In this case, the Style Sheet file type is selected. Type the filename in the Name text box; and, click the Add button. This creates a new file in your project. In this case, the file is named Stylesheet1.css.

Add the new editor

To add your favorite editor for this file type, right click the new file in the Solution Explorer. Select Open With… from the pop-up menu. This will bring up the Open With… dialog box:


Image:VSOpenWith.jpg
Figure: Visual Studio Open With… Dialog Box


Now, click the Add… button. This brings up a second dialog box like this:


Image:VSAddProgram.jpg
Figure: Visual Studio Add Program Dialog Box


Type the location of your favoite editor into the Program name text box; or, use the browse button () to find it. Then, type the name of your editor in the Friendly name text box. Click the OK button to add it to the list of available editors.

Set the default editor

Now, you can either set your favorite editor as the default for this type of file using the Set as Default button; or, you can use the Open With… command each time you wish to use it.


Image:VSTopStyle.jpg
Figure: Visual Studio Open With… Dialog Box


Personal tools