U
UberSamji
Guest
Hi, everyone.
If you've used Lua for Garry's Mod. You'll appreciate that its implementation in GMod differs slightly from that of standard Lua.
For those fussy people who would rather have their GMod Lua code highlighted properly (e.g. when they're using C-style comments) and whom use PSPad as their editor of choice for this task; may appreciate this custom Lua highlighting hack I have included in this post for GMod's implementation of Lua (basic syntax changes).

Enjoy and I hope those who use PSPad will find it useful.
If you've used Lua for Garry's Mod. You'll appreciate that its implementation in GMod differs slightly from that of standard Lua.
For those fussy people who would rather have their GMod Lua code highlighted properly (e.g. when they're using C-style comments) and whom use PSPad as their editor of choice for this task; may appreciate this custom Lua highlighting hack I have included in this post for GMod's implementation of Lua (basic syntax changes).

Enjoy and I hope those who use PSPad will find it useful.
---------------------
Instructions to use
----------------------
[1] Close PSPad if open and extract the contents of the archive to the /Syntax subfolder of your PSPad installation path.
[2] Run PSPad. Point to Settings --> Highlighter Settings.
[3] In the Highlighter Settings dialog; browse throught the left-pane list of languages and check a placholder field ("<not assigned>").
[4] Check the checkbox for the field. Click on the Specification tab in the right pane.
[5] In the right pane, under User Highlighters - scroll through the list of available language highlighters until you come to "GMod Lua". Select it
[6] Click Apply and then OK.
[7] Open a GMod Lua file such as a SWEP file. If you don't have (standard) Lua highlighting enabled, GMod Lua highlighting should already be applied.
Otherwise on the "Change document syntax highlight" toolbar button (the one which in PSPad's default theme looks like a Visual Studio logo with "C++" written above it). In the list, choose "GMod Lua". Click OK and GMod Lua highlighting should be instantly applied.
NOTE: If you wish to also have the standard Lua highlighter enabled at the same time, following the instruction outlined in Step 7, will be a necessity everytime you want to highlight code GMod Lua style.