TatML Syntax Highlighting for Sublime Text
This package provides syntax highlighting for TatML (Tatting Markup Language) files in Sublime Text.
Installation
Manual Installation
- Open Sublime Text
- Go to
Preferences→Browse Packages... - Create a new folder called
TatML - Copy these files into the
TatMLfolder:
File Location
On macOS:~/Library/Application Support/Sublime Text/Packages/TatML/
On Windows:%APPDATA%\Sublime Text\Packages\TatML\
On Linux:~/.config/sublime-text/Packages/TatML/
Features
Syntax Highlighting
- Keywords:
pattern, thread, shuttles, repeat, if, etc. - Elements:
R(Ring),C(Chain),SR(Split Ring),MR(Mock Ring) - Picots:
p, sp, lp, jp - Numbers: Stitch counts
- Strings: Pattern names, thread specifications
- Comments:
//line comments and/* */block comments - Functions:
join(), use, connect
Color Scheme
- Purple: Keywords (bold)
- Blue: Elements like R, C, SR, MR (bold)
- Orange: Picot types
- Red: Numbers
- Green: Strings
- Gray: Comments (italic)
File Extensions
The syntax highlighting automatically activates for files with these extensions:
.tatml.tml
Example
pattern "Simple Flower" {
thread: size20
shuttles: 1
// Center ring
center: R(4, p, 4, p, 4, p, 4, p, 4)
// Petals
repeat 4 {
petal[current]: R(3, sp, 3, join(center.picot[current]), 3, lp, 3)
}
}
Customization
To customize colors, edit TatML.sublime-color-scheme and modify the color variables:
"variables": {
"blue": "#4A90E2",
"green": "#7CB342",
"orange": "#FF9800",
"purple": "#9C27B0",
"red": "#E53935",
"gray": "#757575"
}
Troubleshooting
Syntax highlighting not working?
- Restart Sublime Text after installation
- Check that files are in the correct
Packages/TatML/directory - Manually select syntax:
View→Syntax→TatML
Want to set TatML as default for .tatml files?
- Open a
.tatmlfile - Go to
View→Syntax→Open all with current extension as...→TatML
Version
TatML Syntax Highlighting v1.0
Compatible with TatML v0.1.2
License
MIT License - Free to use and modify