cancel
Showing results for 
Search instead for 
Did you mean: 

How to set external source code editor in Firefox v16

SOLVED
Highlighted
New User

How to set external source code editor in Firefox v16

Hi..

could someone tell me how to set notepad++ as the default source code viewer in FF v16 please?

I've set view_source.editor.external to true and set notepad++ location in view_source.editor.path but the FF default one still opens page source.

Any help would be appreciated.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
New User

Re: How to set external source code editor in Firefox v16

It's working now! Not sure how or why, I just set the path again and it worked...used exactly the same path as before!

Would be nice if it worked for 'view selected source' too but that still opens in the default viewer but at least it's better than before.

Thanks for the help :)

13 REPLIES
Site Moderator

Re: How to set external source code editor in Firefox v16

Did this work in previous Firefox versions?

Do you set the file path on the about:config page or via a user.js file or by editing prefs.js?
You need to escape the backslashes (use a double \\)

  • user_pref("view_source.editor.path", "C:\\Program Files\\Notepad++\\Notepad++.exe");
New User

Re: How to set external source code editor in Firefox v16

Thanks for the reply cor-el.

I've been using v15.x and 16 and it hasn't worked at all...although, if memory serves me correctly, it used to work on much older versions. I've been using other browsers and have only recently switched back to FF.

I set the path in about:config but when checking the prefs.js file, everything looks fine and the backslashes are escaped.

Would love to find a fix for this as the default viewer is a bit naff.

Thanks.

New User

Re: How to set external source code editor in Firefox v16

It's working now! Not sure how or why, I just set the path again and it worked...used exactly the same path as before!

Would be nice if it worked for 'view selected source' too but that still opens in the default viewer but at least it's better than before.

Thanks for the help :)

New User

Re: How to set external source code editor in Firefox v16

It is not working for me. I do not even have the option to view page source and selecting view source: uses the default editor which does not allow page editing. This worked in older versions but not this version with my XP Pro. View_source.editor.external is set to true and view_source.editor.path is set to "C:\\Program Files\\Notepad++\\notepad++.exe" What am I missing?

Site Moderator

Re: How to set external source code editor in Firefox v16

Open the source code in a Firefox tab with the view-source: protocol and then use View Page Source (Ctrl+U) to open the source in the external editor.

New User

Re: How to set external source code editor in Firefox v16

I have upgraded to version 18 and am getting the same behavior on both my XP machine and my Windows 7 machine. On both installations: view_source.editor.external;true view_source.editor.path; "C:\\Program Files (x86)\\Notepad++\\notepad++.exe"

and in both cases if I open Tools; Developer Tools; and Page source or whether I view_source: on the page and Control U as you suggest it merely opens a second Firefox source viewer window which does not allow editing the page source. What am I missing? I have tried copying the path with escape and without and with quotes and without. The path is correct as I find the path then copy it.

Site Moderator

Re: How to set external source code editor in Firefox v16

You only need tho escape the backslashes in the prefs.js or user.js file.

On the about:config page you need a path with a single backslash.

  • view_source.editor.path: "C:\Program Files (x86)\Notepad++\notepad++.exe"
New User

Re: How to set external source code editor in Firefox v16

I have tried the escape character. I have tried it without the escape character. I have tried it with quotes. I have tried it with %20 for the spaces and yet it still insists on opening with the default Firefox viewer.

New User

Re: How to set external source code editor in Firefox v16

I've noticed that even when notepad++ was set as the source code viewer, in some websties the default one would still open instead. Perhaps it's something to do with encoding, not sure but try another website or two to make sure that isn't happening with you.

Also, if you can't sort it, try the ViewSourceWith extension as you can set Notepad++ in there and choose to overwrite the default settings on right click. It works really well.