Jump to content

Syntax Highlighting for .sfs and .cfg Files


NathanJang

Recommended Posts

Hello. This is my first post on this forum.

I have recently made a .tmLanguage specification for the .sfs and .cfg files in KSP. This allows syntax highlighting in Sublime Text. (IIRC some other text editors use it too, but it's mainly for Sublime.) I was surprised that I couldn't find one, given the large modding community, or perhaps there is already syntax highlighting somewhere, and I just haven't found it.

Any comments or suggestions?

Link to comment
Share on other sites

Installing through Package Control works perfectly. Thanks!

I found a few small problems with the syntax highlighting. It identifies numbers even when they're part of a string and certain lines that are commented aren't identified correctly. I took a screenshot to illustrate.

mxtTvED.png

Edited by fizzboy
MediaCrush isn't working today... changed to imgur link
Link to comment
Share on other sites

  • 5 months later...

Hey, while this seems pretty cool, there are some concerns on usage, while its a free application, I never heard of Sublime before, and it isn't open-source.

A quick test run to try this out, and I couldn't get package manager no work properly. On top of that its a big step to learn the Sublime workflow alone.

Has anybody seem something like this, but for a more open/commonly used engine? Like this one for example, this mention only for KDE but I'm guessing open-source apps follow some kind of standard.

Besides that, if there isn't an alternative, what would be the commonly used language syntax that comes the closest to KSP?

Link to comment
Share on other sites

There are open-source alternatives to Sublime, such as http://limetext.org/ or https://atom.io/

If you look into the source code of my syntax definition, it's simply regular expressions of components of the syntax. I encourage you to fork my project and port it to other text editors :)

Really cool, awesome, so these same open-source will work the the existing syntax :)

I tried to look a bit into the syntax of katepart in comparison with yours, seems doable but I'm afraid I'm way over my head.

Cheers!

Link to comment
Share on other sites

  • 4 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...