@cluesurf/beat-code
The VSCode Syntax Highlighter for .beat tab files
What it highlights
A .beat file is YAML front matter + one or more tab blocks:
instrument: drumkit
tempo: 100
measure: 4*4
H|x-x-:x-x-:x-x-:x-x-|
S|----:x---:----:x---|
K|x---:----:x---:----|

The grammar colorizes:
- Comments —
# ...(line comments) - Known YAML keys —
instrument,tempo,humanize,measure,time,velocity,hit,note,flam - Custom YAML keys — uppercase line names (
H,S,T1, etc.) and inline note overrides - Numbers — including measure specs (
4*5) and time signatures (5/8) - Tab rows — line names +
|measure separators +:beat separators - Note characters — main hits (
x,o,b,c,d,f,g,r) vs. accents (O,X,J,B) - Combining diacritics —
x̣,x́,x̃,ẋhighlighted as custom note slots - Silence —
-rendered as a comment color so the rhythmic pattern stands out
Markdown injection: triple-backtick beat blocks inside .md files are
highlighted via the markdown.beat.codeblock injection grammar.
Development
Inside the editor, press F5. This will compile and run the extension
in a new Extension Development Host window. Make changes then press F5
again, etc.
Here is more info on building an extension. Here is how to publish the extension.
To publish, get an access token by following these instructions.
- The organization for the access token is at ClueSurf.
- VSCode Marketplace profile: aex.dev.azure.com/me.
- VSCode package page for ClueSurf: marketplace publishers/cluesurf.
License
MIT
ClueSurf
Made by ClueSurf, meditating on the universe ¤. Follow the work on YouTube, X, Instagram, Substack, Facebook, and LinkedIn, and browse more of our open-source work here on GitHub.