Index
Steps


Notepad++ (npp) is a free source code editor for Windows (a minimal IDE).

It is simple editor to learn a programing language before moving on to a more sophisticated IDE.

Trick: If a setup step does not appear to be working, try closing and reopening Notepad++.


If needed, install Notepad++
On Notepad++ "Plugins" menu, check if NppExec is present.

If no, do next install step.
If yes, skip the next step.
Plugins
	Compare >
	DSpellCheck >
	MIMITools >
	Converter >
	NppExec >
	NppExport >
Open the menu item "Plugins - Plugins Admin".

  • Select "NppExec"
  • Click Install

Hit the F6 key or do menu action "Plugins - NppExec - Execute".

  • Copy script (from below) into "Command(s)" field.
  • Click "Save"
  • (new dialog opens)
  • Enter Run Nodejs
  • Click "Save"
  • Trick: now click "Cancel" to close dialog

Script:
NPP_SAVE
cd "$(CURRENT_DIRECTORY)"
node $(FILE_NAME)

Save the content shown into a file named "hello.js".
console.log("Hello World");
Copy "package.json" from this ZIP and put into same directory as your "hello.js" file from the previous step.

NOTE WELL -- You will need to copy this same "package.json" to any working directory where you will be saving and running JavaScript files as described in these steps.
console.log("Hello World");
  • Hit the F6 key or do menu action "Plugins - NppExec - Execute"
  • Choose "Run Nodejs"
  • Click Ok

The output should include "Hello World"
Process started (PID=12688) >>>
Hello World
<<< Process finished (PID=12688). (Exit code 0)
Do menu action:

  • Plugins - NppExec - Advanced Options
  • Choose Associated script -- "Run Nodejs"
  • Enter Item name -- "Run Nodejs"
  • Click "Add/Modify"
  • Click Ok

Close and restart Notepad++

Do menu action:

  • Run - Modify Shortcut
  • Activate tab "Plugin commands"
  • Find and select action name "Run Nodejs" (there is filter field at bottom of window)
  • Double click row or do "Modify" action
  • Select desired shortcut

If you hit a "shortcut conflict" for a desired shortcut key, you can add the shortcut key, and then go find the other action and "Clear" the shortcut for it.

  • Assuming hello.js is still open
  • Hit your shortcut key
The output should include "Hello World"
Process started (PID=12688) >>>
Hello World
<<< Process finished (PID=12688). (Exit code 0)