NppJavaScript plug-in for Notepad++


NppJavaScript is a GPLv2 licensed plug-in for Notepad++ to extend it to add editable JavaScript macros. Notepad++ is a free (free as in "free speech" and also as in "free beer") source code editor and Notepad replacement, which supports several programming languages, running under the Microsoft Windows environment. The plug-in uses the Mozilla JavaScript engine SpiderMonkey version 1.7. SpiderMonkey is used in all Mozilla products like Firefox and Thunderbird.


To download version 0.3.0, click here. To download the sources, click here.

How to install

Copy NppJavaScript.dll to the plugins directory and restart Notepad++.

How to use

Create a simple script like below and save it somewhere. Start the plug-in by selecting "Run JavaScript..." from the "Plugins" menu, by pressing Alt+M or press the JavaScript button on the toolbar, select the script file you have saved and see the magic. Error messages are shown on the console window that can be activated from the "Plugins" menu as well.

An incomplete documentation of the functions can be found here.

Sample script

insertText("We started here.");
var i;
for (i = 0; i < 3; i++)
insertText("We went up three lines.");

Why JavaScript?

Why did I choose to integrate JavaScript and not another popular scripting language? There is no real reason. I personally do like JavaScript and I know not every does.

Release history

Version 0.3.0 (26 November 2008)

Version 0.0.1 (10 November 2008)