5

I use Chrome for 99% of my work, but one application only works in IE. One major problem I have is that the 'View Source' option on XML documents opens the source Notepad, which always seems to screw up the encoding. I've found tutorials about changing the program used for viewing source for IE9, but in IE11 they've completely redesigned the F12 window and now there's not even a file menu at all.

How can I change the default application that 'View Source' uses in IE11?

2
  • 1
    @Ƭᴇcʜιᴇ007 Ah sorry, I should clarify. For HTML documents, it uses the built-in viewer, but for XML files it uses Notepad.
    – p.s.w.g
    Oct 30, 2014 at 18:04
  • Ahhhh, gotcha! That makes more sense. ;) Oct 30, 2014 at 18:10

1 Answer 1

5

Here’s a simple way to make Notepad++ work as the default HTML viewer for Internet Explorer, but not lose coloured HTML views. First create a batch file (say called np.bat) containing the following,

START "" "C:\Program Files (x86)\Notepad++\notepad++.exe" -lxml %1

save the batch file to this directory:

C:\Program Files (x86)\Notepad++

Next edit the registry key here to tell IE to use Notepad++ instead of Windows Notepad:

Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\View Source Editor\Editor Name

change the (Default) registry entry above to:

"C:\Program Files (x86)\Notepad++\np.bat"

Source

5
  • Do you know if Notepad++ will leave this file intact across updates?
    – p.s.w.g
    Oct 30, 2014 at 18:41
  • The batch file? It should keep it, but to be safe you could always put the batch file in a different folder. :) Oct 30, 2014 at 18:42
  • 1
    Actually, in my registry there's no entiry for ...\View Source Editor. (probably because this machine never had IE10 or lower installed?) I'm kind of wary about creating the this as I don't know what the default value should be or any of the other values under this path.
    – p.s.w.g
    Oct 30, 2014 at 18:46
  • Which version of Windows are you using? Oct 30, 2014 at 18:52
  • 2
    I found this forum post which corroborated the advice and suggested just creating the keys. I did that and it worked--didn't even have to restart IE. I noticed an annoying flash of the console when the batch file executed, so I simply changed the value to C:\Program Files (x86)\Notepad++\notepad++.exe and it seems to work just as well without the flash of the console. Thanks for your help.
    – p.s.w.g
    Oct 30, 2014 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .