Page 1 of 5

Syntax highlighting for Notepad++ and TextPad

PostPosted: Fri Sep 12, 2014 1:16 pm
by Blue Shadow
This is a syntax highlight thingy for a few of the ZDoom special lumps to be used with Notepad++ or TextPad. The supported lumps are:

Code: Select allExpand view
-------------------------------------------------------
| Lump     | Extensions (Notepad++)    | Notes        |
|-----------------------------------------------------|
| ACS      | .acs                      |              |
| DECORATE | .dec                      | Discontinued |
| MAPINFO  | .zmap (subject to change) | New          |
| ZScript  | .zsc .zc .zs              |              |
-------------------------------------------------------

Spoiler: Preview

Git repository
Download configurations
ACS auto-completion for Notepad++ - by boris (Optional)

Here is how to use:

(the following instructions concern Notepad++. For instructions on how to use it with TextPad, see here.)

  • Download the linked file and extract the .xml files contained within somewhere on your machine.

    (The files with the "dk" suffix are for a dark theme/style, and the ones with "lt" are for a light one. So go with what suits you.)

  • Start Notepad++ up and from the menu toolbar: Language --> Define your language...
  • In the User Defined Language window, click on Import and navigate to where you extracted the .xml files. Choose a file to import.
And that's it! If your file has one of the extensions from the table above, the syntax will be applied automatically on the file when it's opened. You can, of course, force the syntax on any file regardless of extension by choosing the language from the Language menu (it should be at the very bottom of the list).

Note: if after import you don't see the language in the Language menu, then just do a restart of the program.


Credits:

  • gamefreakdude and Nash for the DECORATE one, which I used as a guide.
  • sirjuddington and Gez for SLADE3's own syntax highlight configurations and the highlight colors used (for the light theme).

Re: ACS syntax highlighting for Notepad++

PostPosted: Fri Sep 12, 2014 1:47 pm
by everamzah
Thanks very much. It works great.

Re: ACS syntax highlighting for Notepad++

PostPosted: Fri Sep 12, 2014 1:56 pm
by Nash
Haha wow, totally forgot that I had a hand in the original definition... my brain is failing! XD Thanks for this BlueShadow!

Re: ACS syntax highlighting for Notepad++

PostPosted: Sat Sep 13, 2014 8:35 am
by Blue Shadow
You're welcome!

Re: ACS syntax highlighting for Notepad++

PostPosted: Sat Sep 13, 2014 10:02 am
by kodi
Thanks a ton dude, this is amazing. Especially after I changed the colours to suit my black background 8-)

Re: ACS syntax highlighting for Notepad++

PostPosted: Sat Sep 13, 2014 11:33 am
by Enjay
I don't suppose anyone fancies converting this to a Textpad SYN file do they?

I currently use the C highlighting and it works pretty well to be honest but an ACS specific setup would be nice if anyone fancied doing it.

Re: ACS syntax highlighting for Notepad++

PostPosted: Sat Sep 13, 2014 3:09 pm
by Apothem
Oooooh! Handy! My old text editor software has changed a lot and the stuff I have is out of date. This is perfect for my needs! Thanks! :D

Re: ACS syntax highlighting for Notepad++

PostPosted: Sat Sep 13, 2014 4:59 pm
by Blue Shadow
Enjay wrote:I don't suppose anyone fancies converting this to a Textpad SYN file do they?

Here you go.

I suppose you already know how import/use the configuration?

Edit: I almost forgot, for the coloring part: Keywords 2 is for functions, Keywords 3 is for constants, and Keywords 1 is for pretty much any other keywords.

Re: ACS syntax highlighting for Notepad++

PostPosted: Sat Sep 13, 2014 5:43 pm
by Enjay
Blue Shadow wrote:I suppose you already know how import/use the configuration?

Yes I do, and it works like a charm. Thank you. :)

Re: Syntax highlighting for Notepad++ and TextPad

PostPosted: Sat Jan 31, 2015 11:58 am
by Blue Shadow
Added one for DECORATE. Also, in addition to the standard, light theme, a dark one is available.

Re: Syntax highlighting for Notepad++ and TextPad

PostPosted: Mon Feb 02, 2015 12:40 pm
by Kappes Buur
I used to select C for the scripts, but this is so much nicer.
Thanks.

Re: Syntax highlighting for Notepad++ and TextPad

PostPosted: Mon Feb 02, 2015 3:20 pm
by NeuralStunner
Kappes Buur wrote:I used to select C for the scripts, but this is so much nicer.
Same here.

Unfortunately I can't think of a nicer way to force Decorate styling for arbitrary filenames. I have literally hundreds of actor files across several projects, and changing the extensions on those would be a pain in the arse.

I don't suppose anyone knows of a way to force language detection from an opening comment? Perhaps needing a plugin?

Re: Syntax highlighting for Notepad++ and TextPad

PostPosted: Mon Feb 02, 2015 4:33 pm
by Kappes Buur
NeuralStunner wrote:.... I have literally hundreds of actor files across several projects, and changing the extensions on those would be a pain in the arse. ....

I find this one extremely helpful
http://www.leftandwrite.com/filenamemanager/

Re: Syntax highlighting for Notepad++ and TextPad

PostPosted: Tue Feb 03, 2015 4:57 am
by Gez
ren *.txt *.dec

Re: Syntax highlighting for Notepad++ and TextPad

PostPosted: Tue Feb 03, 2015 12:31 pm
by NeuralStunner
It's not that I don't know how to do it. I think Notepad++ is a great editor and there should be a way to make its features extension-agnostic.

Also I sometimes reach Gez levels of laziness. :P