Skip to main content

TatML Syntax Highlighting for Sublime Text

This package provides syntax highlighting for TatML (Tatting Markup Language) files in Sublime Text.

Installation

Manual Installation

  1. Open Sublime Text
  2. Go to PreferencesBrowse Packages...
  3. Create a new folder called TatML
  4. Copy these files into the TatML folder:
    • TatML.sublime-syntax
    • TatML.sublime-color-scheme

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?

  1. Restart Sublime Text after installation
  2. Check that files are in the correct Packages/TatML/ directory
  3. Manually select syntax: View → Syntax → TatML

Want to set TatML as default for .tatml files?

  1. Open a .tatml file
  2. Go to ViewSyntaxOpen 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