DCSIMG
How To Change Visual Studio Default Editor - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

How To Change Visual Studio Default Editor

How To Change Visual Studio Default Editor

Yes I know this sounds strange, but some times this can be very useful, For example, let say we are .NET developers but really addicted to NotePad++, and each time I click on File.CS file I want notepad++ to open it…

There are two ways to do it:

The Ugly Way – Registry

Under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0 find the “Default Editors” key (create if doesn't exists).

Create another Key with the name of the File extension (Example :cs) you want to allocate to a custom editor, inside that key create:

  1. String Key called “Custom” with the name of the Custom Editor (You can choose..)
  2. DWORD called “Type” with value of(Default)

image

Below the File Extension Key create another key with the custom editor name and add String Key with the path to the Custom Editor.

image

You can use below script to easily create massive amount of custom editors for different extensions.

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Default Editors]

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Default Editors\cs]
"Type"=dword:00000002
"Custom"="Notepad++"

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Default Editors\cs\Notepad++]
@="\"C:\\Program Files (x86)\\Notepad++\\notepad++.exe\""gb
[Update 08/08/10 11:05] Download Reg File

The Normal Way

image

image

Enjoy

Comments

Yaron Shahrabani said:

Why not adding the contents of a .reg file?

Only requires the REGEDIT4 Header or something like that (to complete what you already wrote).

# August 8, 2010 10:40 AM

shair said:

Hi Yaron,

I've add the Reg file for download.

Thanks

# August 8, 2010 11:28 AM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# August 9, 2010 12:16 AM

Hoosta Style Hotels Collection: comment les hotels de luxe augmentent leurs r??servations said:

Pingback from  Hoosta Style Hotels Collection: comment les hotels de luxe augmentent leurs r??servations

# August 9, 2010 5:12 AM

Starter Guide To Self-improvement , Achieving Success And Goal Setting said:

Pingback from  Starter Guide To Self-improvement , Achieving  Success And   Goal Setting

# August 9, 2010 12:23 PM

Twitter Trackbacks for How To Change Visual Studio Default Editor - Shai Raiten [microsoft.co.il] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 How To Change Visual Studio Default Editor - Shai Raiten         [microsoft.co.il]        on Topsy.com

# August 9, 2010 9:28 PM

Will Putting A Bottle Of White Wine In A Wine Refrigerator Destroy It? said:

Pingback from  Will Putting A Bottle Of White Wine In A Wine Refrigerator Destroy It?

# August 10, 2010 12:15 AM

Notepad++ « ?????? ???????????????????? said:

Pingback from  Notepad++ «  ?????? ????????????????????

# August 10, 2010 3:33 PM

best rb singing group in the 90’s? | mens business suit, women, boy said:

Pingback from  best rb singing group in the 90’s? | mens business suit, women, boy

# August 22, 2010 7:50 PM

Rob Erwin said:

Registry method also works under version 9.0 also (just go to 9.0 instead of 10.0 and make entries there)

THANKS!

# January 6, 2011 4:44 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: