본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

How to set external source code editor in Firefox v16

  • 13 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: 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.

선택된 해결법

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

문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (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

선택된 해결법

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.

글쓴이 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.