Change Default Text Editor in Fx

By default Firefox uses Notepad its own viewer when viewing the source of a page (CTRL+U or View, Page Source or selecting View Page Source from the Context Menu). You can select which text editor (such as Notepad++) Firefox uses by default with this simple tweak:

1. In a new tab type about:config in the address bar
2. In the filter field type view_source.editor.external
3. Double-click on the entry to set it to true
4. In the filter field type view_source.editor.path
5. Double-click on the entry and in the pop-up box enter the path for your text editor
6. Click OK and close the tab

Source: CyberNet Forum

19 Comments on Change Default Text Editor in Fx

  1. Um, Firefox provides its own source viewer and uses it by default. Still an interesting tip. Thanks!

  2. Firefox provides its own source viewer, that is right, but not everyone just wants to view the source sometimes.

    This change did exactly what I wanted it to do, got view source routed to my notepad++ thanks alot =]

  3. This fix does not work on my WinTel(DELL Dimension E521) machine.
    Is the path like this: “C:Program FilesEditPlus 3”
    or from the firefox directory, like this: “..Program FilesEditPlus 3”?

    Neither path funstions. I remain with the default editor. I even copied the path from the properties section of the EditPlus shortcut. No luck.

    Any ideas.

    Best regards

    Wayne

  4. It looks like the path does not like the space between “Program” and “Files”. I replaced it with %20, and it worked.

    Best regards,

    Henri

  5. Euh, sorry, I made a mistake. It doesn’t work
    Henri

  6. suresh peddi | July 22, 2008 at 1:19 PM |

    I wanted FF to open my source in a notepad, but when i provide the source to be C:WINDOWSsystem32notepad.exe, an new notepad window is opened, with a windows popup “The file name, directory name or volume label syntax is incorrect”.

    What is it that iam doing wrong? do i provide notepad.exe? or something else??

    Please let me know.

    Suresh

  7. Peter Crouch | September 4, 2008 at 1:40 PM |

    Personally I prefer this plain and simple old school text editor:
    http://home.online.no/~westerma/WestEdit/

  8. Interestingly, this tip works for me using UltraEdit (a popular programmer’s text editor) for most web pages, but not this particular page. LOL!

    The problem seems to be in the title of the page which has some odd characters in it (specifically, the apostrophe) that FireFox passes along in the temporary file’s path that it sends the editor. I use UltraEdit as the default editor in IE, and have no problems. Therefore, it appears to be an issue with FireFox, not UltraEdit. It would appear that Firefox has resolved the issue in their source editor rather than creating and passing a file name that other editors will always like while IE doesn’t make this mistake.

    If anyone has any pull with the FireFox team, it seems like this would be relatively easy to fix in the next release.

    I have found that a plugin called ViewSourceWith fixes this problem and works perfectly. You can get it at
    https://addons.mozilla.org/en-US/firefox/addons/versions/394

    John

  9. Thanks – I was resorting to opening stuff in IE when I wanted to edit source, so this is really helpful, thanks.

  10. seems that if you capitalise the drive letter it dont work…? Maybe just my quirky machine

  11. it worked for me, although I had to remove the quotes from the entry box. In other words, I entered the raw path, without surrounding it in quotes.

  12. Nice. I prefer to look at my source code with textpad and this made it possible.

    Thanks!

  13. dileepgalt | March 17, 2011 at 8:20 AM |

    Got exactly what I need, notepad++ integration 🙂

  14. Great, nice tool. thanks !

  15. None of that worked. I still have notepad as an HTML editor and it will not take any other choice. I need to change the HTML editor from notebook so that it displays help pages in Audacity. I choose MS FrontPage provided the correct path and still nothing. How do I change the HTML selection to soothing other than Notepad. The instructions provided do not work.

  16. Worked for me. At first, I entered as path the path that I had copied from the Start menu shortcut (right-click -> Properties). That didn’t work – still the same editor. Then I went back to about:config, removed the quotation marks, and now I have Notepad 2 as my editor! 🙂

    No need to remove any spaces.

  17. perumalsamy | August 18, 2012 at 5:35 AM |

    it is not work. please tell me another way please

  18. In my older versions of Firefox I used to be able to open page source in an external viewer (Notepad++) on both my XP and Windows 7 machines but since version 16 and now version 18 of Firefox I can not get an external viewer to open. I set:
    view_source.editor.external;true
    and
    view_source.editor.path; C:Program%20 Files (x86)Notepad++notepad++.exe

    I have tried quotes around the path, escape character () for the slashes and %20 for the space in the path but still Firefox (18) insists on opening page source with its lame version of a viewer which makes it very difficult to edit the source! What am I missing?

  19. It worked for me, first swapping the default for Notepad 2, later swapping that for Notepad++. But sometimes or some web pages FF would still open (it) in its default editor. As I couldn’t figure out why, I installed the add-on John suggested, and that works perfectly!

3 Trackbacks & Pingbacks

  1. Blog Year in Review: August 2007 « Firefox Extension Guru’s Blog
  2. How to retrieve your ISP credentials from a DLink DIR-615 router (or any other router for that matter)
  3. Tutorial: How to Inspect, Edit, and Save a Web Page | Learning from Lorelle

Comments are closed.