Notepad++: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
 
(22 intermediate revisions by 14 users not shown)
Line 1: Line 1:
'''[http://notepad-plus.sourceforge.net/uk/download.php Download page]''' (~1.4 MB).<br>
'''Version:''' 4.0.2.<br>
'''License:''' GPL <br>
'''Author/Publisher:''' [http://notepad-plus.sourceforge.net/ Don Ho.].


== Details ==
== Introduction ==


[[Notepad_Plus_Plus|Notepad++]] is a free, open source (GPL) source code editor which supports several programming languages running under the Microsoft Windows environment.
[http://notepad-plus.sourceforge.net Notepad++] is a free, open source (GPL) source code editor which supports several programming languages running under the Microsoft Windows environment.


This project, based on the Scintilla editor component, is written in C++ with pure Win32 API calls and uses STL. Notepad++ is licensed under the GPL Licence. The aim of Notepad++ is to offer a slim and efficient binary with a totally customizable GUI.
This project, based on the Scintilla editor component, is written in C++ with pure Win32 API calls and uses STL. The aim of Notepad++ is to offer a slim and efficient binary with a totally customizable GUI.


[[Image:Notepad_plus_plus-NSIS-Settings.png|right|thumb|160px|Notepad++ with NSIS Integration]]  
[[Image:Notepad_plus_plus-NSIS-Settings.png|right|thumb|180px|Notepad++ with NSIS Integration. [https://web.archive.org/web/20100210154702if_/http://notepad-plus.sourceforge.net/uk/screenshots.php More screenshots].]]  


[http://notepad-plus.sourceforge.net/uk/screenshots.php More screenshots]


== Features ==
== Features ==


* Provides syntax highlighting for NSIS.
* Provides syntax highlighting for NSIS.
* Has translatable interface to many languages (available in English, Spanish, French, Russian, German);
* Code Folding.
* Code Folding;
* Tabbed Editing.
* Tabbed Editing;
* Auto-completion.
* Auto-completion;
* Reg-ex search and replace.
* Reg-ex search and replace;
* No Admin requirement for installation.
* No Admin requirement for installation;
* Scriptable key bindings.
* Scriptable key bindings;
* Has translatable interface to many languages (available in English, Spanish, French, Russian, German).
* And more!
* And more!


== Integrating with NSIS ==
== Integrating with NSIS ==
Line 36: Line 32:
'''Additional Help'''
'''Additional Help'''


'''[http://notepad-plus.sourceforge.net/uk/run-HOWTO.php Run.. Help]'''
'''* [https://web.archive.org/web/20100316175746if_/http://notepad-plus.sourceforge.net/uk/run-HOWTO.php Run.. Help]'''
----
|}
|}


[[Notepad_Plus_Plus|Notepad++]] can integrate with NSIS utilizing both syntax highlighting and compiling abilities.  
Notepad++ can integrate with NSIS utilizing both syntax highlighting and compiling abilities. Additional features such as Function Lists assist with code navigation.




Line 46: Line 41:
* In the menu, select Language -> NSIS.
* In the menu, select Language -> NSIS.


'''Establishing a link to the NSIS Compiler'''
'''How to run the NSIS Compiler from Notepad++'''
#In the menu, select Run -> Run..
* In Notepad++, on the menu bar, click Run -> Run... (or press F5)
#Verify that makensis.exe is in your environmental user path.
 
#Enter: makensis.exe "$(FULL_CURRENT_PATH)"
* Type in the location of the NSIS file named "makensisw.exe"
#Click Save..
**  If there are spaces in the location, use "" around the directory name
#Assign a Name: ''NSIS Compile''
 
#Select User Key Binding
* After the location, put a space and type  "$(FULL_CURRENT_PATH)"
**  -(e.g. <code>"C:\Program Files\NSIS\makensisw.exe" "$(FULL_CURRENT_PATH)"</code>)
 
* Click save, and name the command (e.g. NSIS Compiler).  You can select a keybinding as well (e.g. Alt+F1) if you wish.
 
 
== Full integration using Notepad++ plug-ins ==
 
[[Image:Notepad_plus_plus-NppExec.png|thumb|none|top|Notepad++ with NppExec]]
 
* Install the [https://github.com/d0vgan/nppexec/ NppExec plug-in] (Plugins->Plugins Admin...).
* Press '''F6''' to open the execute script dialog.
** Paste the following code and save as '''<code>Compile</code>'''
<code><pre>
npp_console local -
//
set local NSISDIR ~ strunquote "$(SYS.ProgramFiles(x86))\NSIS" // Adjust this if you installed to a custom path
//
cls
npp_console on
npe_console -- p-
npe_console local -- x+
npp_save
 
if ".nsi" == "$(EXT_PART)" then
set local _=$(CURRENT_DIRECTORY)
cd $(NSISDIR)
if "$(NSISDIR)" != "$(CURRENT_DIRECTORY)"
set local NSISDIR ~ strunquote "$(SYS.ProgramFiles)\NSIS"
endif
cd $(_)
npp_console local +
"$(NSISDIR)\makensis" /v3 /Launch "$(FULL_CURRENT_PATH)"
npp_console local -
goto @EOF
endif
:@EOF
npp_console local +
</pre></code>


'''Running NSIS Compiler'''
* Open NppExec advanced options (Plugins->NppExec->Advanced Options...).
* Menu -> Run - > NSIS Compile
** Create a menu item
* You can also use the ''custom key binding'' to execute the NSIS Compiler.
*** Name it "Compile" (or any other name you want).
*** Pick '''<code>Compile</code>''' in the associated script droplist.
*** Click '''Add/Modify'''
*** Restart Notepad++ if it tells you to
*** Assign a keyboard shortcut (Run->Modify shortcut/Delete command...)
**** Switch to the '''Plugin commands''' tab and find the menu item you created and assign it a shortcut
* Adjust output hightlighting (Plugins->NppExec->Console output filters...)
** Check one of the checkboxes and fill in '''<code>Error * "%ABSFILE%" on line %LINE% --*</code>''' and fill in '''<code>FF</code>''' for Red and click '''OK'''.
 
----


== Links ==
<attach>Notepad++NppExecAutoConfigNSIS.zip</attach> will do most of this for you (except assigning the F5 keyboard shortcut).


* [http://notepad-plus.sourceforge.net/ Notepad++ homepage].
* [http://en.wikipedia.org/wiki/Notepad_Plus_Plus Notepad++ Wikipedia].


[[Category:Development Environments]]
[[Category:Development Environments]]
[[Category:Syntax_Highlighting]]

Latest revision as of 16:43, 15 August 2023

Introduction

Notepad++ is a free, open source (GPL) source code editor which supports several programming languages running under the Microsoft Windows environment.

This project, based on the Scintilla editor component, is written in C++ with pure Win32 API calls and uses STL. The aim of Notepad++ is to offer a slim and efficient binary with a totally customizable GUI.

Notepad++ with NSIS Integration. More screenshots.


Features

  • Provides syntax highlighting for NSIS.
  • Code Folding.
  • Tabbed Editing.
  • Auto-completion.
  • Reg-ex search and replace.
  • No Admin requirement for installation.
  • Scriptable key bindings.
  • Has translatable interface to many languages (available in English, Spanish, French, Russian, German).
  • And more!


Integrating with NSIS

Additional Information

Extensions Supported

.nsi .nsh as NSIS project files.


Additional Help

* Run.. Help

Notepad++ can integrate with NSIS utilizing both syntax highlighting and compiling abilities. Additional features such as Function Lists assist with code navigation.


Syntax Highlighting:

  • In the menu, select Language -> NSIS.

How to run the NSIS Compiler from Notepad++

  • In Notepad++, on the menu bar, click Run -> Run... (or press F5)
  • Type in the location of the NSIS file named "makensisw.exe"
    • If there are spaces in the location, use "" around the directory name
  • After the location, put a space and type "$(FULL_CURRENT_PATH)"
    • -(e.g. "C:\Program Files\NSIS\makensisw.exe" "$(FULL_CURRENT_PATH)")
  • Click save, and name the command (e.g. NSIS Compiler). You can select a keybinding as well (e.g. Alt+F1) if you wish.


Full integration using Notepad++ plug-ins

Notepad++ with NppExec
  • Install the NppExec plug-in (Plugins->Plugins Admin...).
  • Press F6 to open the execute script dialog.
    • Paste the following code and save as Compile
npp_console local -
//
set local NSISDIR ~ strunquote "$(SYS.ProgramFiles(x86))\NSIS" // Adjust this if you installed to a custom path
//
cls
npp_console on
npe_console -- p-
npe_console local -- x+
npp_save

if ".nsi" == "$(EXT_PART)" then
	set local _=$(CURRENT_DIRECTORY)
	cd $(NSISDIR)
	if "$(NSISDIR)" != "$(CURRENT_DIRECTORY)"
		set local NSISDIR ~ strunquote "$(SYS.ProgramFiles)\NSIS"
	endif
	cd $(_)
	npp_console local +
	"$(NSISDIR)\makensis" /v3 /Launch "$(FULL_CURRENT_PATH)"
	npp_console local -
	goto @EOF
endif
:@EOF
npp_console local +
  • Open NppExec advanced options (Plugins->NppExec->Advanced Options...).
    • Create a menu item
      • Name it "Compile" (or any other name you want).
      • Pick Compile in the associated script droplist.
      • Click Add/Modify
      • Restart Notepad++ if it tells you to
      • Assign a keyboard shortcut (Run->Modify shortcut/Delete command...)
        • Switch to the Plugin commands tab and find the menu item you created and assign it a shortcut
  • Adjust output hightlighting (Plugins->NppExec->Console output filters...)
    • Check one of the checkboxes and fill in Error * "%ABSFILE%" on line %LINE% --* and fill in FF for Red and click OK.

Notepad++NppExecAutoConfigNSIS.zip (25 KB) will do most of this for you (except assigning the F5 keyboard shortcut).