Iskanje po podpori

Izogibajte se prevarantski tehnični podpori. Nikoli vam ne bomo naročili, da pokličete telefonsko številko ali nam pošljete osebne podatke. Sumljivo dejavnost prijavite z gumbom »Prijavi zlorabo«.

Več o tem

How to set external source code editor in Firefox v16

  • 13 odgovorov
  • 1 ima to težavo
  • 1 ogled
  • Zadnji odgovor od Southerner

more options

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.

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.

Izbrana rešitev

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 :)

Preberite ta odgovor v kontekstu 👍 0

Vsi odgovori (13)

more options

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");
more options

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.

more options

Izbrana rešitev

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 :)

more options

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?

more options

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.

more options

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.

more options

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"
more options

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.

more options

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.

more options

This works for me in the prefs.js file, so apparently escaping is necessary in this case

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

You will have to adjust the path for your 64 bit Windows version.

  • user_pref("view_source.editor.path", "C:\\\\Program Files (x86)\\\\Notepad++\\\\Notepad++.exe");
more options

Nick2012: I did not see a viewsourcewith variable.

Cor-el: that worked. No changes that I made in about:config seemed to make much difference but editing prefs.js directly as you suggested: •user_pref("view_source.editor.path", "C:\\\\Program Files (x86)\\\\Notepad++\\\\Notepad++.exe");

did take care of the problem.

Thank you.

more options

You're welcome.

You can check the value on the about:config page to see how it looks there in case you want to use another editor.

Spremenil cor-el

more options

The config file shows the path to Notepad++ as being identical to what I had already entered! That entry is and was: C:\\Program Files (x86)\\Notepad++\\Notepad++.exe

It is ironic that entering it in Prefs.js made it work but putting it in via the about:config page did not.  Of course in prefs.js there are two back slashes for every one shown above.

Oh well, at least now it works.

Thank you.