RPTools.net

Discussion and Support

Skip to content

It is currently Fri Sep 22, 2017 7:06 pm 






Reply to topic  [ 6 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Kobold
 
Joined: Sat Oct 24, 2015 10:22 am
Posts: 2
Location: Brazil
 Post subject: TextMate Bundle - Macro Syntax Highlight and Code Completion
PostPosted: Sat Oct 24, 2015 12:07 pm 
Hello everyone,

I found myself helpless at the Mac side of the force regarding any decent tool to help me edit macros. :lol: I found in the forums some posts about Eclipse usage and even a plugin for Notepad++ that do highlight, but nothing for my beloved Apple. :oops:

Anyways, I’ve worked on a fully working TextMate bundle!
Image
If you want to help improve it, I’ve made a GitHub repository for it.

The Bundle
  • Syntax Highlight

Does recognize pretty much everything inside the macro tags (there’s some bugs with variables that does contain numbers, though)

  • Code Completion

It just completes anything you’re typing, and cycles through options (Macromates needs to implement a way to show a list of options)

  • HTML Markup Highlight

I’ve used the built-in HTML bundle from Macromates, so it doesn’t highlight macros inside HTML, like macros for in href attributes (maybe will support in a future version)

  • Supports dragging .mtmacro files, loading the macro contents

oh, just a small props 8) if you drag a .mtmacro file on TextMate, it will get the macro contents and put into the text area. You’ll have to select the file type to activate the highlight, as I haven’t found a way to set that :evil:


Grab your copy
You can get a copy of the bundle:

Also, if you want to see the latest features without waiting a new release, just download the master branch zip, unzip, and add ".tmbundle" suffix in the folder name. Then follow the "How to install" section below!


How to install
Drop the .tmbundle file in the
Code:
~/Library/Application Support/Avian/Bundles
directory (you can use Shift+Cmd+G and paste this path to go straight to it!), then open TextMate.

Also, AFAIK this bundle is supported by other editors, like Sublime Text, e-TextEditor and probably others that states to be "TextMate-compatible".


To-Do’s
  • Fix variable regex to match names with numbers aside commas (LOL :oops: )
  • Highlight macro commands inside HTML strings (e.g. href attributes)
  • Add drop support for other file types (rptok, rpcpmn, etc)
  • Automatically set the syntax type on drops


Happy macro’ing!


File comment: MapTool Bundle for TextMate v1.0
MapTool.tmbundle.zip [9.09 KiB]
Downloaded 58 times

_________________
There is no dark side of the moon. Matter of fact, it is all dark.
Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9379
Location: Netherlands
 Post subject: Re: TextMate Bundle - Macro Syntax Highlight and Code Comple
PostPosted: Sat Oct 24, 2015 2:11 pm 
im not a mac user but thank you for sharing!!

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Sat Oct 24, 2015 10:22 am
Posts: 2
Location: Brazil
 Post subject: Re: TextMate Bundle - Macro Syntax Highlight and Code Comple
PostPosted: Sat Oct 24, 2015 3:48 pm 
Thank you!

And as I said, this bundle can be used in Sublime Text, which has a Windows version - so yeah, there’s some love here for you Windows’ users too :mrgreen:

_________________
There is no dark side of the moon. Matter of fact, it is all dark.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7860
Location: Bay Area
 Post subject: Re: TextMate Bundle - Macro Syntax Highlight and Code Comple
PostPosted: Sat Oct 24, 2015 6:38 pm 
I was just checking out sublime text. One thing that interests me is the 64bit memory management. For really big files with syntax highlighting and code folding there can be some delay with npp++. Also, they changed how some of the syntax highlighting works with line comments which messes up the macro function header (no longer highlighted). I may have to check out sublime text and import your work. My current file for npp++ is starting to get out of date and needs a refresher or perhaps I'll go to a cross platform editor.

_________________
Downloads:


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Tue Sep 21, 2010 2:13 pm
Posts: 67
 Post subject: Re: TextMate Bundle - Macro Syntax Highlight and Code Comple
PostPosted: Sun Oct 25, 2015 2:17 am 
Wow. This looks like a lifesaver. However, I'm totally new to TextMate and I'm having trouble with installation.

I downloaded TextMate and dragged it over to my applications folder.
I created the ~Library.../Avian/Bundles folder (it does not exist) and dropped the MapTool.tmbundle file into it.
It did not show in my available TextMate bundles.

So I also tried by pasting it into the TextMate application folder (/Applications/TextMate.app/Contents/SharedSupport/Bundles/MapTool.tmbundle)
But it still does not show in my available TextMate bundles.

Any advice would be appreciated.


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3701
Location: MD
 Post subject: Re: TextMate Bundle - Macro Syntax Highlight and Code Comple
PostPosted: Sun Oct 25, 2015 5:47 pm 
nirkedar wrote:
Any advice would be appreciated.

Not on a Mac but found this in the instructions for another textmate bundle:

Quote:
You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.


And then there is this (which might be your problem):

http://textmate.1073791.n5.nabble.com/T ... 17936.html

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 6 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman