Configuration of Notepad++ for use with PAWN

From Hydrover
Revision as of 09:42, 6 July 2017 by Andrea (talk | contribs) (Auto-completation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This section cover all the necessary steps to get Notepad++ to compile your PAWN script, highlight errors and warnings and fast jump to where they are generated.


Associate Notepad++ with PAWN source files

From Settings Menu select Preferences...

Npp-set-pref.png


Select File Association, then select Customize, then add .p .pwn .inc extensions

Npp-file-assoc.png


Compile

NppExec plugin

Is a plugin that allow for execution of external programs.


Installation

From Plugins Menu: select Plugin Manager, then select Show Plugin Manager

Npp-open-plugin-manager.png


In the Available tab: find & select NppExec, then click Install

Npp-exec-inst-1.png

Configuration

From Plugins Menu: select NppExec, then select Execute


Npp-exec-cfg-1.png


In the Command(s) window type:

npp_save
cd $(CURRENT_DIRECTORY)
"C:\Program Files (x86)\Pawn\bin\pawncc.exe" -V -d0 -O3 -v2 -t4 "$(FILE_NAME)"

then clik Save

in the Script Name type:

PAWN Compile

then clik Save


Npp-exec-cfg-2.png


From Plugins Menu: select NppExec, then select Advanced Options


Npp-exec-shortcut-1.png


In Menu items * frame

  • check Place to the Macros submenu


In Menu item frame:

  • in Associated script select PAWN Compile from the list
  • click Add/Modify, then click OK


Npp-exec-shortcut-2.png


Compile Shortcut

From Settings Menu select Shortcut Mapper

Npp-exec-shortcut-3.png


Select the Plugin Commands tab, search & select PAWN Compile, then click Modify

Npp-exec-shortcut-4.png


Select the combination that you want e.g.: Shift + F7 than click OK

Npp-exec-shortcut-5.png


Compile Toolbar Button

Installation

From Plugins Menu: select Plugin Manager, then select Show Plugin Manager

Npp-open-plugin-manager.png


Under the Available tab: find & select Customize Toolbar, then click Install

Npp-cust-tbar-inst.png


Configuration

  • Download this image Compile.bmp and save it in: %appdata%\Notepad++\plugins\config as compile.bmp
  • Into the same folder create a file named CustomizeToolbar.btn with this content Macro,PAWN Compile,,,compile.bmp
  • From Encoding Menu select Encode in UCS-2 LE BOM ( this apply to CustomizeToolbar.btn )


Npp-cust-tbar-cfg2.png


  • From Plugins Menu select Customize Toolbar, then select Custom Buttons to enable


Npp-cust-tbar-cfg1.png


Errors & Warnings

From Plugins Menu select NppExec, then select Console Output Filters

Npp-exec-cons-out-filt-1.png


In the Filter tab, check Enable Console Output Filter

Npp-exec-cons-out-filt-2.png


In the Replace tab:

  • check Enable Replacing Filters
  • check Replacing Filter 1
  • fill Find what: (
  • fill Replace with: :
  • check Replacing Filter 2
  • fill Find what: )
  • leave empty Replace with:

Npp-exec-cons-out-filt-3.png


In the HighLight tab:

  • check first item
  • fill it with: %FILE%:%LINE% :*error*
  • fill: Red 0xFF, Green 0x00, Blue 0x00
  • check B
  • check second item
  • fill it with: %FILE%:%LINE% :*warning*
  • fill: Red 0x00, Green 0x00, Blue 0xFF
  • check B
  • click OK

Npp-exec-cons-out-filt-4.png


Syntax Highlight & In-line Help

  • From the config folder of the HydDevKit copy userDefineLang.xml into %appdata%/Notepad++ folder
  • From the config folder of the HydDevKit copy PAWN.xml into C:\Program Files (x86)\Notepad++\plugins\APIs folder


Auto-completion

From Settings Menu select Preferences...


Npp-set-pref.png


Select Auto-Completion, then choose your preferred combination


Npp-auto-complete.png