Notepad++ Secrets: Installing as Source Viewer
© 2012, Martin Rinehart
To be precise, using programmer's editor Notepad++ as your source code HTML viewer is a feature of the browsers, not of Notepad++. Still, it is extremely handy and integrates Notepad++ wonderfully into your workflow (in browsers that permit a foreign source viewer).
In your browser, context click the page (right click, for most of us) and pick "View Page Source" (Firefox), "View Source" (MSIE) or "Source" (Opera) to open Notepad++ to the page source. That will open Notepad++ (if it's not already open) and open the source in a new tab (if it's not already open). (If you've been working on the source page, it's as if you had switched to Notepad++ and selected the appropriate tab.) You fix what's broke, Alt+Tab to return to your browser and F5 to load the fixed page.
This right-click, Source (view to edit) is about one click more than you'd need with a good IDE. Similarly Alt+Tab, F5 (edit to view) is only one extra click. Unlike any IDE we know, it let's you flip back and forth between edit and view in three major browsers. Your workflow, especially for fixing little glitches, could hardly be improved.
We leave our files open in Notepad++ tabs until we get a bunch. Then FTP them to the server; then close them in Notepad++. (It's one handy way of keeping track of which ones have changed.)
You will need to know (or be able to find) the full path and executable name for Notepad++ to install it. Likely it's:
c:\Program Files (x86)\Notepad++\notepad++.exe
It used to be just this:
This is very obscure, but it's easy once you know the secret. Open a new tab. Type
about:config in the address bar (no spaces). Go there. (FF 14+ shows a scary "This might void your warranty." warning. Click "I'll be careful. I promise.") You'll have a search bar.
Search for "view_source.editor.path". Right-click, "Modify" it to your Notepad++ path. Find "view_source.editor.external" and right-click, "Toggle" it to true. Done.
F12 for Developer Tools. Choose File / Customize ... /Other as this shows:
From the file dialog, find your
Ctrl+F12 / Advanced / Programs to get here:
Edit "Choosing application for viewing source" if it's not Notepad++. Done.
As yet (May, 2012) we have not been able to launch Notepad++ from Chrome. P.S. Still not yet (August, 2012). P.P.S. Still not yet (September, 2013).
Feedback: MartinRinehart at gmail dot com.
# # #