Difference between revisions of "Setting up a Notepad++ (SourceMod)"

From AlliedModders Wiki
Jump to: navigation, search
m (Plugin NppExec)
m (Plugin NppExec)
Line 25: Line 25:
 
Install NppExec Notepad++ plugin.<br/>
 
Install NppExec Notepad++ plugin.<br/>
 
:https://sourceforge.net/projects/npp-plugins/files/NppExec/<br/>
 
:https://sourceforge.net/projects/npp-plugins/files/NppExec/<br/>
  C:\Program Files (x86)\notepad++\plugins\NppExec.dll
+
  C:\Program Files (x86)\notepad++\plugins\NppExec\NppExec.dll
 
Restart NotePad++<br/>
 
Restart NotePad++<br/>
 
<br/>
 
<br/>

Revision as of 16:34, 21 November 2018

This is guide to setting up NotePad++
Install Notepad++ 32-bit x86 text editor

https://notepad-plus-plus.org/download/


SourcePawn syntax highlight & autocompletion

Download npp-docs zip file

https://github.com/raziEiL/SourceMod-Npp-Docs/releases

and extract files on your desktop.

Move sourcemod.xml file into Notepad++ ...plugins\APIs folder

C:\Program Files (x86)\notepad++\plugins\APIs\sourcemod.xml


Open Notepad++ and select Language -> Define your language...
Select Import... and open userDefineLang.xml file

Restart Notepad++

Plugin NppExec

Install NppExec Notepad++ plugin.

https://sourceforge.net/projects/npp-plugins/files/NppExec/
C:\Program Files (x86)\notepad++\plugins\NppExec\NppExec.dll

Restart NotePad++

Choose Plugins -> NppExec -> Execute... (F6)
Add this script:

NPP_SAVE
cd "$(CURRENT_DIRECTORY)"
spcomp.exe "$(FILE_NAME)"
cmd /q /c move "$(CURRENT_DIRECTORY)\$(NAME_PART).smx" "$(CURRENT_DIRECTORY)\..\plugins\$(NAME_PART).smx"

Save -> name it sourcemod -> Save


Choose Plugins -> NppExec -> Console Output Filters... (Shift+F6)

✔️ %FILE%(%LINE%) : error * 0x99 0x00 0x00 B
✔️ %FILE%(%LINE%) : warning * 0x00 0x50 0x99 I



Choose Plugins -> NppExec -> NppExec Advanced Options...
Select Associated scipt: sourcemod, then click Add/Modify button. Ok and restart Notepad++

Choose Settings -> Shortcut Mapper...
and go Plugin Commands tab.
Find and clear Execute... = F6 button.
Find sourcemod = and Modify F6 button in this line.

Testing compiling Sourcemod plugin

Go SourceMod scripting folder, where you find *.sp files.
Make copy of any file for testing purpose and open it with NotePad++.
When you hit F6 key, NotePad++ should:

  • Save your file
  • Run CMD and compile current *.sp file to *.smx
  • Move compiled *.smx file from scripting folder to SourceMod plugins folder.




--Bacardi (talk) 08:47, 21 November 2018 (CST)