Modding, Mission Design, and Coding > FS2 Open Tools

Make hand editing missions and tables easier with SYNTAX HIGHLIGHTING!

(1/7) > >>

I've created syntax highlighting modules for FreeSpace 2 mission and table files to use in modern text editors like TextMate, Sublime Text, and Atom. Syntax highlighting makes it so much nicer and easier to edit mission and table files by hand.

Syntax highlighting is much prettier to look at, of course. But more importantly, syntax highlighting makes it immediately easier to see and understand what is happening in the file when you read it. For those times when you need to fire up a text editor and mess around with the guts of your mission and table files, this is much better than using Notepad.

Check it out:

More examples with different themes:

(Click to enlarge)

Section headings, keywords, SEXP names, numeric values, string values, variables, colour control codes in XSTR text, etc., all receive unique formatting. The section headings will populate the quick navigation features of TextMate and Sublime Text, making it easy to get to the section that you need to deal with.

I've created versions of the FreeSpace 2 syntax highlighting module for the three text editors mentioned above. To use one, do the following:

* Choose one of the three text editors and install it.

* TextMate is the best all around, but it is for Macs only. Get it here.
* Sublime Text is the best for Windows and Linux, but not as user friendly as the others. Get it here.
* Atom is slightly less powerful than the first two, but more user friendly than Sublime Text. Get it here.
* Install the FreeSpace 2 module for your application

* For TextMate and SublimeText, go to and follow the simple installation instructions to get the FreeSpace 2 bundle up and running in no time.
* For Atom, just go to the Install section of the application's settings, search for "language-fs2", and click the install button once it finds the package for you.
Supported file types:

* .fs2 (mission files)
* .fc2 (campaign files)
* .tbl (table files)
* .tbm (modular table files)
All three of these text editors let you choose your favourite theme, so you can choose whichever colour scheme you prefer. I personally like the one in the top picture, but there are many options available.


* 0.3.3
* Detect SEXP operators correctly even when not separated by whitespace from parentheses
* 0.3.2
* Allow space between digit and closing parenthesis in XSTR construct
* 0.3.1
* Derp...
* 0.3.0
* Redefines some language elements (again) because Atom's default themes ignored a rather important one
* Fine tunes a couple of the regular expressions
* 0.2.1
* Adjusts SEXP detection to work around a bug in Sublime Text
* 0.2.0
* Restructures SEXP handling to be much more robust
* Better differentiates some language elements
* 0.1.0
* Initial release

Neat! I don't suppose you have a language/syntax file for vim?   ;7

Also seems like a good time/place to link in Mjn's similar efforts for notepad++ (TBL/TBM) (debug log)

Oh, sweet. I've always preferred Sublime Text; one of these days, I was going to try to make my own syntax highlighting for it. It looks like you've saved me the trouble! :yes:

I don't suppose you could add debug log support...?


--- Quote from: niffiwan on January 04, 2016, 02:27:16 am ---Neat! I don't suppose you have a language/syntax file for vim?   ;7

--- End quote ---

--- Quote ---Also seems like a good time/place to link in Mjn's similar efforts for notepad++ (TBL/TBM) (debug log)

--- End quote ---

Cool. Well, now we have more options, and not just for one editor on Windows. :)

--- Quote from: AdmiralRalwood on January 04, 2016, 02:31:50 am ---I don't suppose you could add debug log support...?

--- End quote ---

Probably. Might be a while before I can get around to it, though. :)

I'll move this to tools in a couple of days. Let the FREDders see it first. :D


[0] Message Index

[#] Next page

Go to full version