Sublime Text 3 - Macro Syntax Highlighting!

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
User avatar
wwmoraes
Kobold
Posts: 5
Joined: Sat Oct 24, 2015 11:22 am
Location: Netherlands
Contact:

Sublime Text 3 - Macro Syntax Highlighting!

Post by wwmoraes »

Hello again,

So yeah, it's been 2 years since I've made the TextMate Bundle to add syntax highlighting and posted here on the board.

Soon after that I went a little inactive from macro'ing, and has returned recently, now using Sublime Text 3 for everything code-related. 8)

For those who code, this editor needs no introduction. If you don't know it, download and be amazed by its power! :twisted:

So, I’ve worked on a new syntax highlighting package, this time a native one for the Sublime Text 3 editor.

TL;DR
Image

The package is pretty simple and straight-forward: it adds syntax highlighting for .rpmacro files (or you can switch the syntax manually if you will, check instructions on the readme).

It also has mismatching braces check, colouring them as needed. (yeah, no more stack overflow and nesting hell headaches! :D )

Install through Sublime Text
Spoiler
[*]Open the Command Palette… (CTRL+SHIFT+P on Windows/Linux or ⌘⇧P on Mac)
[*]Type in

Code: Select all

Package Control: Install Package
and hit Enter (just

Code: Select all

install package
will do too)
[*]Type in

Code: Select all

MapTool Syntax
and hit Enter
[*]Profit! :mrgreen:
If you want to help improve it, I’ve made (again) a GitHub repository for it.

PS.: You'll need at least build 3092 to use this package.

PS2.: I've JUST created the package and requested to add it to the Sublime Text's repository, so the install instructions above won't work until they approve the adding. I'll update the post as soon as they approve. If you want to install in the meanwhile, check the readme for manual-installing instructions.

PS3.: It's there!!!
Image
then...
Image

Happy macro’ing!
Last edited by wwmoraes on Mon Nov 13, 2017 8:05 am, edited 1 time in total.
Toolbox "There is no dark side of the moon. Matter of fact, it is all dark."

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by JamzTheMan »

FYI: Macro editing in my fork does have syntax highlighting/code folding/numbers/search/replace built into the macro editor and allows for multiple macro editors to be open at once (in case you get tired of copy/paste).

Of course, I know sometimes it's nice to use the editor you are most comfortable with so more options is always better! :)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
wwmoraes
Kobold
Posts: 5
Joined: Sat Oct 24, 2015 11:22 am
Location: Netherlands
Contact:

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by wwmoraes »

Macro editing in my fork does have syntax highlighting/code folding/numbers/search/replace built into the macro editor and allows for multiple macro editors to be open at once (in case you get tired of copy/paste).
Yeah I'm well aware of all the forks. The point is that I'm uncomfortable to use them because of compatibility/stability issues that might come up (I've tried Mote some time ago, but with the 1.4 prospect I ditched it). :oops:

Also I tend to keep my players on vanilla MapTool (trust me, it was hard enough to persuade them to use it with all those web [*cough* DND-only, form-based *cough*] VTTs around). Changing their versions every now and then is unpractical. :?
Of course, I know sometimes it's nice to use the editor you are most comfortable with so more options is always better! :)
That's the point here. Besides, doing syntax highlighting on these "millennial" text editors is a breeze :lol:
Toolbox "There is no dark side of the moon. Matter of fact, it is all dark."

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by JamzTheMan »

I can see your viewpoint, there were an explosion of "forks" a few years ago and pretty much most of em went dormant.

But just an FYI:

1. I've long since "supported" my fork since the beginning and will continue to do so long term (I play weekly and have since '91 and use MY tool every week so, ya, not ditching it)
2. My "fork" is truly a "forked repository" and I submit my changes back to RPTools for consideration and inclusion.
3. I keep my "fork" open source (see #2) so all is available for peer review and consider myself an RPTools developer (as much as one can within an open source project)
4. I strive to keep compatibility (see #2) in as far as any MapTool version is compatible with campaigns and tokens from previous versions.
5. I provide an "export campaign" feature that strips out objects so you can port your campaign back to 1.4.0.1 (eg removes new lighting options, token vbl, etc)
6. The version I host at maptool.nerps.net is considered a stable release (vs building from source) and is the same version I use every week (I have some skin in the game as some would say)

Note: I'm not trying to persuade you, only noting that my fork is nothing like that other 4 letter word/vtt you mentioned lol (in case other people come across this post)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by Full Bleed »

Going to chime in here...
JamzTheMan wrote: 2. My "fork" is truly a "forked repository" and I submit my changes back to RPTools for consideration and inclusion.
Nerps is kind of in a Catch 22. The development on it far outstrips what's been happening with MT proper. So much so that, at this point, it probably should *be* the official MT release... I've danced around the idea a bit in the past... but given the small amount of development and attention the MT releases get these days I don't see what we have to lose. *If* nerps became the main branch I think bugs and other issues would get pounded out pretty quickly and more people would be benefiting from some of the nifty new things it has (rather than waiting years for them to filter back into the main.) In its current condition it feels like far more of a MT upgrade than anything we've seen in years.

The "catch" is that, like the OP, because it's *not* the core release... despite knowing how much "better" it is... I'm one of those users that doesn't use it. Heck, I'm still on 1.4.0.2 because there isn't anything really necessary in the 05 release to warrant getting my players to upgrade... let alone the so-called development versions that we're warned against using (but then see suggestions to use, from foundation users, at various places on the forums.)

MT is not in a great place in this regard right now.
3. I keep my "fork" open source (see #2) so all is available for peer review and consider myself an RPTools developer (as much as one can within an open source project)
Is anyone developing more than you right now? Jagged's not doing much lately. Last thing I've seen Az do was talk about fixing the back-up/auto-save but before that it had been a good long time since he'd said/done much of anything. And Craig's been MIA for a very long time. At some point, the reigns have to handed off to the most 1) capable, 2) willing, and 3) interested people...

At this point MT could do a lot worse than making Nerps the official version.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

bobifle
Giant
Posts: 219
Joined: Thu Oct 19, 2017 12:36 pm

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by bobifle »

I'm kinda new around here but I second Full Bleed's comment.

People have been doing a lot of great work to bring maptool 1.4. But it looks like it's entering a dormant state. People have earned their rest ! And if anyone is actively proposing to update the software, it could be a good opportunity for the project.

User avatar
wwmoraes
Kobold
Posts: 5
Joined: Sat Oct 24, 2015 11:22 am
Location: Netherlands
Contact:

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by wwmoraes »

Nerps is kind of in a Catch 22. The development on it far outstrips what's been happening with MT proper. So much so that, at this point, it probably should *be* the official MT release... I've danced around the idea a bit in the past... but given the small amount of development and attention the MT releases get these days I don't see what we have to lose. *If* nerps became the main branch I think bugs and other issues would get pounded out pretty quickly and more people would be benefiting from some of the nifty new things it has (rather than waiting years for them to filter back into the main.) In its current condition it feels like far more of a MT upgrade than anything we've seen in years.
Way true. One of the major complaints I keep hearing from players is that MT isn't updaded as much as other tools, and it looks like a dead dog that gets some kicking once in a while. Sadly, 1.4.1.X builds just second this kind of viewpoint.

Anyways, regular updating isn't an issue for me. MapTool still kicks other VTTs asses pretty easily. With or without syntax highlighting built-in and other goodies. :lol:
The "catch" is that, like the OP, because it's *not* the core release... despite knowing how much "better" it is... I'm one of those users that doesn't use it. Heck, I'm still on 1.4.0.2 because there isn't anything really necessary in the 05 release to warrant getting my players to upgrade... let alone the so-called development versions that we're warned against using (but then see suggestions to use, from foundation users, at various places on the forums.)
Full Bleed just hammered home my point. Don't get me wrong Jamz, I feel you and am grateful you're working to evolve MT, keep it up please! :mrgreen:

It's a shame I'm not really into Java, cause I'm a long-term hobbyst programmer and would love to help MT... :(
Toolbox "There is no dark side of the moon. Matter of fact, it is all dark."

taustinoc
Dragon
Posts: 515
Joined: Mon Aug 03, 2015 6:30 pm

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by taustinoc »

wwmoraes wrote:One of the major complaints I keep hearing from players is that MT isn't updaded as much as other tools, and it looks like a dead dog that gets some kicking once in a while. Sadly, 1.4.1.X builds just second this kind of viewpoint.
(
I get that frustration, but I've seen the other side, too - too frequent of updates that break backwards compatibility, or just break things that used to work. I played with Mote briefly, but the only time I actually tried to run a game on it, it didn't work due to a bug that came and went and came and went with the frequent updates.

If it can't be prefect, I'd prefer stability over new features. Nothing worse than "Oh, sorry guys, game cancelled because the VTT just updated itself without being told to, and now it doesn't work."

The situation with Nerps is actually, IMO, pretty close to ideal. If you want the new features more than you want the stability, it's there. But if you want the stability, that's there, too. I'm using 1.4.0.5, and will keep doing so until I need something that's only available in a newer edition because I know it works for everyone.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by aliasmask »

I think MT is good as is, so I could live without any more updates, but it's nice to see it grow and add more features none-the-less.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by JamzTheMan »

Thanks for all the kind words. I didn't mean to high jack this thread as it's really for Sublime Text! Sorry.

At the core, we're all hobbyists whether its providing MT updates externally or internally, or via macro code/help, or via frameworks, or contributing graphics (maps, overlays, etc)!

Like the OP, we all are just coding for our own use and throw it out the public in case they MAY want to use it. Open Source at it's best, keep up the good work!
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

maddog
Cave Troll
Posts: 30
Joined: Fri Aug 21, 2009 12:38 am

Re: Sublime Text 3 - Macro Syntax Highlighting!

Post by maddog »

As I find myself using Atom more than Sublime Text these days, I used Atom's built-in converter to make a syntax plugin for Atom. I wasn't sure how to do it for Sublime Text, so I took your TextMate plugin and whacked that.

The steps I followed:

Code: Select all

apm init --package mtmacro --convert <path to the MapTool.tmbundle>
(You can also apparently link directly to the github location of the bundle.)

For those content to simply download the Atom version, you'll need to

Code: Select all

apm link mtmacro
and restart Atom to get it to work.
Attachments
mtmacro.zip
(3.49 KiB) Downloaded 60 times

Post Reply

Return to “User Creations”