The International Simutrans Forum

PakSets and Customization => General Resources and Tools => Topic started by: An_dz on January 25, 2013, 03:53:15 PM

Title: Simutrans dat color highlight and auto-complete for SublimeText
Post by: An_dz on January 25, 2013, 03:53:15 PM
Here's a color highlighter for Simutrans dat files with auto-complete for Sublime Text.

Sublime Text (http://www.sublimetext.com/) is a nagware cross-browser python-based editor. It's a very powerful editor with lot of awesome features and around one thousand plugins/themes/highlighters/etc. Some very complex, like Emmet (http://docs.emmet.io/)

I started creating this when I wanted a way to make sure pak96.comic sources were correct, and later to make it easier to edit.

Some screens of the highlighter in use (click to enlarge):
(http://i.imgur.com/5osVaMR.png) (http://i.imgur.com/5osVaMR.png)

Showing the wrong and correct:
(http://i.imgur.com/zv5NhXd.png)

The auto-complete. Start typing front, select it and then just hit the letter to change. Click tab to navigate to next texts:
(http://i.imgur.com/rGRueBZ.gif)

Also have auto-complete for full object types, here to create a pedestrian:
(http://i.imgur.com/dIUFUhx.gif)

I read that it's compatible with TextMate, an open-source Mac only editor. But I don't have a Mac to test.

Installation
First, remove the .pak in the filename.
In some installations you can double click.
To manually install, put the file in ..\Sublime Text 2\Installed Packages\
Title: Re: Simutrans dat color highlight and auto-complete for SublimeText
Post by: Zeno on January 25, 2013, 04:15:41 PM
Wow, looks cool, really! Although I'd love a np++ plugin instead ;D
Title: Re: Simutrans dat color highlight and auto-complete for SublimeText
Post by: Fabio on January 26, 2013, 03:04:00 PM
I made a rudimentary np++ highlighter, I could easily share it.
Title: Re: Simutrans dat color highlight and auto-complete for SublimeText
Post by: An_dz on January 26, 2013, 03:29:30 PM
Quote from: Zeno on January 25, 2013, 04:15:41 PM
Wow, looks cool, really! Although I'd love a np++ plugin instead ;D
I took a look how to create the syntax highlight and auto-complete on NPP. And C++ programming? Are you serious?
Not that I don't know C or C++, but I'm a very beginner and I would take weeks or months to create it.

It's a major work comparing with this Sublime/TextMate package that took 2 or 3 days to create.
Quote from: Fabio on January 26, 2013, 03:04:00 PM
I made a rudimentary np++ highlighter, I could easily share it.
It would be nice Fabio. Have you created through Custom User Language or you used C++ or other language?
Title: Re: Simutrans dat color highlight and auto-complete for SublimeText
Post by: An_dz on April 26, 2013, 03:33:39 PM
I see some people dowloaded it, don't know if they are using but I've updated it.
Some missing and wrong highlights were included/fixed.