View Single Post
Author Message
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 03-27-2008 , 06:39   [USEFUL] Syntax Highlighting and More for EditPlus (Updated 4/7/08)
Reply With Quote #1

This took a while to create. I used a list someone provided for another text editor a long time ago and converted that over to EditPlus for my liking. Since then lots had been added and I was missing a lot of functions and such that should have been highlighted so I decided to get this stuff up to date.

This tutorial was done using EditPlus Text Editor v2.31 (488). If you're not using that exact version, things might be a bit different from you. Hopefully not too much.

How to:
  1. Download the .zip file and extract the two files inside to your EditPlus folder.
  2. Start up EditPlus and go to Tools - Preferences.
  3. Expand the Files category and choose Settings & syntax.
    • Click Add and give it the name SourcePawn.
    • For the file extensions type in sp;inc.
    • Click the ellipsis (...) next to Syntax File and browse to the .stx file you extracted from the .zip (sp.stx).
    • Check the box next to Trim trailing spaces on save.
    • Click the Tab/Indent button and set how many spaces you want to be for each tab/indent (I use 4/4 as opposed to the default 8/8).
    • This is how it should look so far: http://joe.to/~bl4nk/imgs/editplus-1.png
  4. Click the Syntax colors tab.
  5. Back on the category tree choose Templates (still under Files).
    • Add a new template and call it SourcePawn.
    • Click the ellipsis (...) next to File Path and browse to the .sp file you extracted from the .zip (template.sp).
    • You should have something like this: http://joe.to/~bl4nk/imgs/editplus-3.png
  6. Click Apply and then OK and you should be set. You can now make a SourcePawn file by going to File - New - SourcePawn or by clicking the first icon under File and choosing SourcePawn.
You should be all set, but if you want to take it one step further and make it so you can compile your plugin using EditPlus it's not so hard to do. You have to do a little bit outside of EditPlus and then we can get right into it.
  1. Go and download the newest revision of SourceMod and place the compile tools (compile.exe and spcomp.exe) in a folder.
  2. Inside of that folder make a folder called compiled and a folder called include. Place all of your include files in the include directory. The compiled directory is where your compiled files will go.
Now for the EditPlus part.
  1. Go back to into EditPlus and open up Tools - Preferences.
  2. Expand the Tools category and choose User tools.
    • From the drop down box choose an empty group (will be named "Group #" most likely).
    • Click Group Name and name it SourcePawn.
    • Click Add Tool >> and Choose Program from the list.
    • Name the program Compile.
    • Click the ellipsis (...) next to Command and browse to your compile.exe in the folder we talked about earlier.
    • Under Argument type in "$(FilePath)" (quotes included) and under Initial Directory type in $(DirWin).
    • Check the box next to Close widow on exit.
    • This is how it should look (minus the Command path being different for you): http://joe.to/~bl4nk/imgs/editplus-4.png
  3. Click Apply and then OK and you're all done! Now to compile the file your browsing just save it in the folder where your compile.exe is and hit Ctrl-1. The file will compile and the compile window will come up just as normal.
I hope that wasn't too much. I am really picky with things like this so I thought I'd share with you how I set my stuff up properly. I made a few other modifications to my EditPlus (mainly removing unnecessary toolbars and changing a few colors around), but this was the gist of it.

Any questions, feel free to ask.
Attached Files
File Type: zip EditPlus 2.zip (9.8 KB, 861 views)

Last edited by bl4nk; 07-09-2008 at 15:06.
bl4nk is offline