Notepad-plus-plus: feature request: Open file in original program

Created on 7 Oct 2018  ·  3Comments  ·  Source: notepad-plus-plus/notepad-plus-plus

Notepad++ has the option "open containing folder" in explorer and cmd from the Tab. I work a lot with Arduino files in Notepad++ but to compile the file the original Arduino editor is required. It will be a nice feature of have the possibility to open the editor direct from the Notepad++ tab: "Open file in original program" according the extension and the Windows file association.

plugin question

Most helpful comment

Try
Open in Default Viewer

All 3 comments

To achieve this you could use the RunMe plugin. It executes the currently opend file based on its shell association.

A more flexible way would be to use the NppExec plugin. It provides a console to execute commands in Notepad++ and also allows scripting. Its help file shows example scripts how to call compilers of different programming languages.

I personally use the second solution. I wrote a base script which I can call via keyboard shortcut. According to the current file's extension it calls scripts to start the appropriate compiler or interpreter. In this way a have a sort of shell for 12 programming/scripting languages, including VBScript, Batch Script, GNU Plot, C, C#, SQL and InnoSetup.

I did a quick test with the Run... menu and creating an entry like this seems to work:

cmd.exe /c start $(FULL_CURRENT_PATH)

Try
Open in Default Viewer

Was this page helpful?
0 / 5 - 0 ratings