Licantropía, literatura, cine, juegos de rol… y otros delirios

How to open a file in Opera from Notepad++

Originally published in My Opera forum.

Logotipos Notepad++ y Opera

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.

  1. 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.

    Open Opera from Notepad++

    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.

  2. 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).


  3. 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.

  4. 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.


14 comentarios

  1. Thank you, works great! Maybe you also know how to force Opera that it should apply CSS file when you run HTML from Notepad++ ?

    I would like to get behaviour of Opera+Source+Edit+Apply with Notepad++ as source viewer&editor. Is that possible? For now i get problems because Opera caches files without extensions (.html, .css)

    22/07/2009 en 01:14

    • Glad you find it useful.

      I’m afraid I have no idea if that’s possible at all. Maybe someone in My.Opera forums could answer that question. 😦

      04/06/2009 en 18:53

  2. Carson Fire

    I don’t want this bad enough to hack, so I fiddled around and found an existing route. Use either of two plugins, Explorer or the Window Manager. You can drag the files there to anywhere. Use Explorer if you’re testing many files from a directory, and Window Manager to get at all of your open files. You can’t do this with the bundled Light Explorer or FTP.

    14/12/2009 en 08:16

  3. argh

    Doesn’t work for me. I did as you wrote, but the only effect I’m getting is a new tab in Opera browser (currently 10.51) after pressing shortcut key combination. Any idea??

    23/03/2010 en 23:40

    • argh

      ah, forgot it was php file I have to add “http://localhost/” to the path Any idea how? In that xml file as well?

      24/03/2010 en 12:35

    • argh

      no, sry. still doesn’t work. both HTML and PHP

      24/03/2010 en 12:36

    • You’re right, just tried it using last versions of both apps and it has stopped working. faint

      edit: working again for me, it seems the problem is still in shortcuts.xml file, as the path is erroneously saved.
      After creating the shortcut key combo, open the shortcuts.xml file using Windows own Notepad while Notepad++ is closed (so it doesn’t overwrite the file once modified) and be sure the Opera line doesn’t shows:
      <Command name=”opera” Ctrl=”yes” Alt=”yes” Shift=”yes” Key=”46″>opera</Command>
      <Command name=”opera” Ctrl=”yes” Alt=”yes” Shift=”yes” Key=”54″>C:\Program Files\Opera\opera.exe</Command>
      or something similar, as it will only call the app but not load the file.

      Instead, the path should be:
      <Command name=”opera” Ctrl=”yes” Alt=”yes” Shift=”yes” Key=”46″>opera "$(FULL_CURRENT_PATH)"</Command>
      as in screenshot for step 2.

      Please check that everything is fine. If still doesn’t work, give me a whistle and I’ll check what could be wrong.

      24/03/2010 en 15:22

  4. Anónimo

    thank you butit wont show my thing in opera my file

    22/06/2011 en 12:12

    • I’ve just tried in a clean install system using last versions of both apps and it works fine.

      Follow all steps and try again.

      11/07/2011 en 12:34

  5. lonelyrider

    This works (shortcut add + reg tweak), but it opens page in background tab, I can’t figure out why. Does anyone have this “problem”?

    29/08/2011 en 17:02

    • Opening in foreground here. Maybe it’s related to an Opera setting but can’t figure which one, as I’ve been trying some of them but any of them open in background.

      Weird issue.

      20/09/2011 en 03:08

  6. John Borsberry (john-line)

    thanks for this solution, when are the np++ devs gonna wake up and recognise the greatest browser

    09/12/2011 en 13:24

  7. jokerjim

    I just go to the file manager, right click and “open with” Opera. Seems easy enough to just do that.

    31/12/2011 en 16:58

    • Well, this is just another way to do it. Some people may just prefer using a quick keyboard shortcut, so I’m just offering a fix for them. 🙂

      04/06/2012 en 17:28

¿Algo que comentar sobre la entrada?

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s