0
Answered

ABC Music Notation

Lawrence 8 months ago updated by Alexander Blach (Developer) 8 months ago 5

I have just started with Textastic and have a question about importing sublime syntax highlighting.

The majority oof my use of Textastic is in editing ABC notation music files. Syntax highlighting would be a very big benefit for me. I would like to import this from:

https://github.com/lewdlime/Sfortzando/blob/master/Syntaxes/ABC%20Notation.sublime-syntax

I have downloaded the file, placed it in ~/Library/Containers/com.textasticapp.textastic-mac/Data/Library/Application Support/Textastic and restarted Textastic but it doesn't work.

Is this type of file supported in Textastic?

If not, are there any other suggestions as to how I might implement this? 

This is what I get with Textastic compared to what I need:

Image 565

Image 566


Answered

The syntax definition file needs to be in a subfolder like "ABC". I tried the syntax you linked to, but it didn't work properly in Textastic. 


I also installed that package in Sublime Text, but even there it doesn't work correctly and I get this error instead:


"Error loading syntax file "Packages/Sfortzando/Syntaxes/ABC Notation.sublime-syntax": Apparent recursion within a with_prototype action: 25000 context sanity limit hit".

Instead, I used the syntax at https://github.com/jimhawkridge/SublimeABC, which seems to work fine with Textastic.

Do the following:

  • In Textastic, select Textastic -> Customizations -> Show Customization Folder. This will open the correct folder in Finder.
  • Create a folder, e.g. "ABC"
  • Put the file "ABC Notation.tmLanguage" from https://github.com/jimhawkridge/SublimeABC in there
  • In Textastic, select Textastic -> Customizations -> Reload Customizations, or use Cmd-R

There should now be a new "ABC Notation" syntax definition.

Here is a screenshot of the test.abc file:

Image 568

Excellent Alexander! Many thanks.


I have just been through the same process with sublime and had the same experience. I was coming back here to post that very info!

I also got the Hawkridge package working on sublime and I will now follow your instructions for installing it on Textastic.

Thanks again for such great support.

+1

Just to confirm that it's working perfectly. 


It was the creation of the ABC folder that I somehow missed.

Great to hear that it's working now!

Just for your information: there seems to be a problem with the symbol list when using the "ABC Notation" syntax definition. Sometimes the line break is included in the symbol name which may cause visual glitches in the status bar:

Image 569