SPEdit - a lightweight sourcepawn editor
SPEdit (SP-Edit) is an Editor for Sourcepawn with several features to make the coding in sp easy for you. It's written fully in C# with WPF to provide you a great UI-experience. It comes with standart Sourcemod installations but you can customize it fully on your own. SPEdit can only run on windows!!!
List of some Features:
Compiling-Config System (fully customizeable)
Syntaxhighlighting (parsed from the include directory / fully customizeable)
Source:
The Project and Sourcecode is fully available on GitHub.
You are free to add issues or pull-requests.
Download: Current Version: 1.2.0.2
You can Install the editor (Recommended) or download a standalone folder.
But the installer will also install file associations to *.sp an *.inc if you want.
The Program needs the .NET 4.5 Framework to work.
FAQ:
• I found a bug, where can i report it?
When your are able to recreate this bug, start the editor with the "-safe" argument. A crashlog will then be created after the editor crashed.
You can report a Bug here or just write me a pm or post into this thread here.
And more:
Spoiler
I want to suggest a feature. Where can i do this?
You could write a Github issue here. You could also write me an E-Mail to [email protected] or write me a PM.
What is .NET, C# or WPF?
.NET is a runtime used for the program to run on your computer. It's developed by microsoft.
C# (spoken: C-Sharp) is a programming language used to program SPEdit.
WPF is a part of .NET and is a technology of giving out content on your screen easily with help of your graphic-card. This allows a nice animated and fast Window (User Interface).
How can I set the installation directory and where is it by default?
The installation directory is hardcoded out of several reasons to %appdata% and cannot be changed. You can use the standalone folder if you want it to put it anywhere else.
How is the FTP password stored?
If you defined a FTP password, it is stored in the config file with 128bit AES encryption.
The Key for this encryption is generated when you first startup the editor with a 'Cryptographic Random Number Generator Service'. The key is stored in the options_0.dat. The key is salted internally with a hardware-specific generated salt so you could give away both files because the key only works on your computer. You should nevertheless don't do this obviously.
You can recreate the Key when you start the editor with the "-rcck" argument - your old passwords are invalid then.
Some parts of my code are highlighted strangely red.
The editor highlights per default deprecated 1.6 Syntax.
If you want to write with this Syntax nevermind, then just open the Options Window, go to 'Editor'
and uncheck "Highlight Deprecated (<1.6) Syntax"
Otherwise check out this site.
How can i close the compilerlog?
Press Escape.
"Auto Open Includes" does not work for me?!
The auto open include feature only opens includes, which are not located in the include directory.
This is, to prevent standart-sourcemod includes from opening. (Your custom includes shouldn't even be in there!)
If you have includes there and you want them to be opened, put them in another directory and change the include command accordingly.
When does the Linux/Mac version is comming?
Probably never. SPEdit cannot run in Linux/Mac because WPF isn't implemented in Wine/Mono.
So SPEdit is Windows only, and will (extremely likely) ever be.
What is planned in the future?
There is no Roadmap yet and since I'am mostly of the time busy studying, it wont come much in the near future. But some plans are already made.
How To: Open Scripts:
When you installed the editor, you have many choices of how to open scripts.
You can open them via: double click on a script or include (if you associated the files), right click->'Edit Sourcepawn Script' (if you associated the files), Files->Open in the editor, Drag&Drop into the editor, start with commandline.
Syntaxhighlighting/Autocompletition/Intellisense:
Like said above, all informations for the three, are getting parsed from the include directory.
Where this directory is, is defined on your current loaded config.
Compiling/Copying/Serverstart/FTP upload:
You can compile all opened Scripts on F5. To just compile your current script, use F6.
Press F7 to manually copy all compiled files.
Press F8 to upload all compiled files to a FTP Server.
Press F9 to execute your server.
All actions/directorys/addresses/credentials are defined in the current loaded config.
Configs:
The configs are a main part in SPEdit. They control, how the whole compiling process works.
The SPEdit comes per default with three configs. (SM 1.7, SM 1.7 with SMLib 0.9.7 and SM 1.6).
They can simply be loaded by clicking on them in the 'configurations' menu. You can also edit them
easily or create new ones/delete old ones.
It's recommended, that you create own configs for big projects with their own include directory.
Changelog:
Spoiler
1.2.0.2 - 21th May 2017
Improved:
• Encryption of passwords now hardware salted (optional)
(You have to reenter them in your configs)
• Updater works with SSL
• Global exception handling/error reporting is now always on
Fixed:
• Includes can contain a minus
• Some mistakes in the translation units
• No files opened dialog
• Various UnauthorizedExceptions on accessing files/directories
• Adding of a parenthese on Methodmap Properties
Improved:
• Encryption of passwords now hardware salted
(You have to reenter them in your configs)
• Performance improvements
• Updated AvalonEdit, MahApps, AvalonDock
• Highlighting support for binary/octal literals
• Compilation can now be aborted with ESC
• many more minor things...
Fixed:
• Uppercase X in hexadecimal literals
• Closing bug on editor-split
• Selecting of editors on loading
• Compile bugs
• Cleaning of old update-files
1.1.3.0 - 18th June 2016
New/Added:
• auto closing brackets
Improved:
• FTP Error Detection
Fixed:
• Closing Buttons dont work
• Crash on typing a ; in an opened string
1.1.2.0 - 18th April 2016
New/Added:
Improved:
• New Syntaxhighlighting Color Sheme by mev
• UI Accent Color is now changeable
• Hex-Input for the Colorchanger
Fixed:
• Keyboard Localization for alt-gr depended keys
• Toolbar Dropdown nit selected on startup
1.1.1.0 - 13th April 2016
New/Added:
• dark, high-contrast theme
Improved:
• UI to high contrast
• Threaded RCON-Querys
Fixed:
• Bug in Search/Find Window
• Error while closing spedit
• Keyboard Localization for alt-gr depended keys
Version 1.1.0.0 - The Dynamic Update - 29th March 2016
New/Added:
• New Sourcepawn Parser (about 100-5000% faster [regex vs. tokenizer])
• Dynamic Autocompletition/Intellisense from opened ".inc"-files.
Improved:
• Folding on multilinecomments
• RCon Commands now do not send the ".smx" extension
• loaded file will now popup the window
• "this" is now a highlighted keyword
• the "parsed sourcemod definition"-window contains now much more details
• autocompletition now indicates the type
• autocompletition now uses much more types to complete
• Updated MahApps.Metro and AvalonDock
Fixed:
• Crash on saving
• Highlighting e-mails
Version 1.0.3.2 - 11th August 2015
New/Added:
- Tabs->Whitespace Option
Improved:
Fixed:
- Open quotes now recognized by the reformatter
- Fixed reformatter crash
- Some minor bugfixes
Version 1.0.3.1 - 16th March 2015
New/Added:
- Multiple include directories
Improved:
- Improved UI
- New AvalonDock Version
- RCons now delimited with the semicolon and send at once
Fixed:
- Ternary operators now recognized by the reformatter
- Fixed some Lysis Crashes
- DASM Elements causing crash on closing window
- Crash on saving nonexistant files
Version 1.0.3.0 - The RCon Update - 12th April 2015
New/Added:
- Added a Toolbar
- Safe argument (-safe) + New Crashlogs
- Jump-To dialog
- RCon Querying
- Line reformatting
Fixed:
- No Autocomplete/Intellisense on preprocessor-lines
- Fixed various Syntaxreformatter issues
- Lagging while closing configwindow with no changes
- Crash on editing language files
- Allow FTP upload of copied files.
- DASM-Editor now uses the Global-Scrollspeed
- Forced safe in UTF8-without BOM
- Wrong saving when focus on split windows
Version 1.0.2.0 - The Big SMX Update - 26th march 2015
New/Added:
- Lysis Decompiler (Improved Version)
- smxdasm Dissassembler
- Native scrolling (1 line/tick)
- Improved Definition-Window
Fixed:
- No indentation on singleline-cmds (if, else, while, for)
Version 1.0.1.0 - 21th march 2015
New/Added:
- Syntax Reformatter (Syntax Tidy)
- Expand/Collapse Folding
Fixed:
- Highlighting bug on string-char combination
- Crash on save-dialog while closing
- Not saved/encrypted FTP-passwords on first startup.
I'd also love to get feedback. Hope, you like it.
reegards Aeon
Last edited by _AeonOne_; 03-22-2019 at 13:50.
Reason: Update available: 1.2.0.2
Only thing I'd like to see done at the current moment is a button in the build menu that allows you to do all of the actions at once with one hotkey. (IE: Build, Copy/Upload, Start server(maybe))
To explain it in detail:
Absolutely no! SPEdit fully utilizes WPF for big parts of the code. A port to Linux via Mono, would require to rewrite every WPF-dependent aspect of the program to Windows.Forms .
But thats impossible because various core parts of the program (TextEditor, EditorDock, Windowbase, etc.)
are written for and only WPF.
It's possible to host them in Windows.Forms yes, but that does not make it more compatible.
A port to any other System than windows, would be equally to a rewrite of the program.
I'am fully aware that a big part of the AlliedModders community is running Linux or other os.
But i cannot do anything for cross-compatibility and since the mono community don't want to port WPF (which is quite reasonable) no port of SPEdit will ever exist.
It's simply not possible with SPEdit. Sorry.
To explain it in detail:
Absolutely no! SPEdit fully utilizes WPF for big parts of the code. A port to Linux via Mono, would require to rewrite every WPF-dependent aspect of the program to Windows.Forms .
But thats impossible because various core parts of the program (TextEditor, EditorDock, Windowbase, etc.)
are written for and only WPF.
It's possible to host them in Windows.Forms yes, but that does not make it more compatible.
A port to any other System than windows, would be equally to a rewrite of the program.
I'am fully aware that a big part of the AlliedModders community is running Linux or other os.
But i cannot do anything for cross-compatibility and since the mono community don't want to port WPF (which is quite reasonable) no port of SPEdit will ever exist.
It's simply not possible with SPEdit. Sorry.
I tried to run this on WINE as well but it didn't work.
If I can make this run on WINE, I'll report back
EDIT: Tried it out on my windows computer, program crashed as soon as it started up, what does that mean?