How to open a file in Opera from Notepad++
Originally published in My Opera forum.
Based in Scintilla, Notepad++ is a great code editor published under GPL license, offering many features that don’t exist in Windows’ own Notepad. You can download it from its official website.
Many of us use it for editing HTML code due its useful syntax highlighting and its capacity for opening the edited file in an external program. Sadly, it offers default support for IE, Fx and even Chrome and Safari, but Opera is still the always forgotten -so we have no other chance that adding it manually.
This tutorial involves editing a XML file and maybe adding an entry in the Windows Registry, but it isn’t harmful at all and either requires advanced user knowledge. Anyway, be sure to make a backup of edited files before saving them -just for the case.
- Run Notepad++, create a shortcut (Start Menu/Run), click “Save…” and configure the shortcut as you like it. In the example screenshot, Opera will be loaded pressing Ctrl+Alt+Shift+O.
Take in mind that is required to specify the name of the program and not the path (that is, just “opera” and no “[X:\path]\opera.exe”. We’ll see later why is that way.
It should work now. And I say “it should” because odds are that it doesn’t work at all… in fact, in my computer, Notepad++ simply get closed.
Try it and, if it does work, you’re done. Otherwise (most sure), go to the next point.
- Now it’s time to go to the path where Notepad++ was installed and open the shorcuts.xml file using Windows’ own Notepad (or some other editor, if you prefer). Search for a line that looks like that one:
<Command name=”opera” Ctrl=”yes” Alt=”yes” Shift=”yes” Key=”79″></Command>
and edit it so it looks that other way (changes are colored in green):
<Command name=”opera” Ctrl=”yes” Alt=”yes” Shift=”yes” Key=”79″>opera “$(FULL_CURRENT_PATH)”</Command>
Save the file and be sure Notepad++ run OK: if it hangs or crashes, restore the shorcuts.xmlbackup file or reinstall the program (and start again this tutorial).
- You must edit the Windows Registry now, so it’s better if you login as admin. Run the following command (Start Menu/Run), choosing the correct path where you installed Opera (so change the colored code if required)*:
reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\opera.exe” /ve /d “C:\Program files\Opera\opera.exe” /f
To be sure it works fine, go to the Start Menu/Run and type “opera” (don’t use the quotation marks). If the browser launches, then you’re done.
- If everything has gone right, Opera should now load files from Notepad++ using the shortcut (Ctrl+Alt+Shift+O) or using the menu (Run/launch in Opera).
*Thanks AyushJ for adding the regedit command.