+1

Custom syntax colors How-To

Une Ulv 13 years ago updated by Alexander Blach (Developer) 12 years ago 5
Hello, I like Textastic and have been using it with regular text (no programing language). I really very much want to use the custom syntax feature and have been trying to define a theme for this with Textmate (a program I do not normally use). Without any success. Therefore, for us naive non-code writing people (yes we exist): would it be possible to provide an easy to follow guide building the required files? For instance, just how to achieve highlighting of the word "aword" in Textastic->steps in Textmate (I did made a folder, added a language and defined a keyword and did try to select from that source in the theme editor but it just did not work...), files to export and import into Textastic, and setting this as a default for all texts.
Would be very amazing!

Hello,

the TextMate manual explains how themes work: http://manual.macromates.com/en/themes


You need to understand the concept of scopes and scope selectors to be able to create your own themes: http://manual.macromates.com/en/scope_selectors

In Textastic, you can tap on the editor with three fingers to see the scope under the cursor. 

It's probably easier to have a look at the huge amount of themes that is available for TextMate. There's a large collection at http://wiki.macromates.com/Themes/UserSubmittedThemes
+1
This TextMate manual entry explains how language grammars work: http://manual.macromates.com/en/language_grammars#language_grammars
+2
Would be great to add a function to add custom syntax colors from the application without having to use TextMate in Mac.
As I don't own a Mac (yet) I can't use TextMate, it would be great to see an alternate way of adding custom colour schemes to Textastic, I've got one theme that I use with everything else which works fantastically.

Other than that, love the app and the constant improvements! It's allowed me to take a lot of work with me and be almost as productive as when I'm at my workstation (if only the iPad had a mouse... kind of defeats the purpose I know).
On Windows, there is Sublime Text and E Text Editor which you can use to test themes.