SongTxt is a simple Visual Studio Code extension that improves the experience around typing in music transcriptions in plain text files. It is built to follow the formatting guidelines used by Ultimate Guitar.
Install the extension from the Visual Studio Marketplace or search for SongTxt from the Extensions pane in Visual Studio Code.
- Syntax Highlighting: Automatic highlighting for chords, song sections, and guitar tablature in
.txtand.tabfiles - Toggle Control: Enable or disable SongTxt syntax highlighting on demand
- Status Bar Integration: Visual indicator showing current state with one-click toggle
- Smart File Detection: Automatically applies to Ultimate Guitar formatted text files
- Grammar Testing: Comprehensive regex testing to ensure accurate chord recognition
See the full list of features and documentation at the SongTxt Wiki.
SongTxt provides two commands accessible via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Enable SongTxt: Activates syntax highlighting for
.txtand.tabfiles - Disable SongTxt: Deactivates syntax highlighting (files appear as plain text)
You can also toggle between enabled/disabled states by clicking the SongTxt status bar item.
- See CHANGELOG file.
- None
- None yet
Currently only grammar/regex tests are maintained.
npm installCompile then run the grammar test suite:
npm run compile
npm testYou should see output ending with something like 16 passing (count may grow as new cases are added).
Edit src/test/suite/grammar.test.ts, add new test(...) blocks, then rerun:
npm testnpm run lint- If patterns disappear, confirm
syntaxes/songtxt.tmLanguage.jsonstill has the expected repository entries. - After changing regex order, update indices in the test file or refactor to search by
comment.
SongTxt is built on and benefits from the wider open source ecosystem:
- Visual Studio Code Extension API – Copyright (c) Microsoft Corporation. Licensed under the MIT License.
- TypeScript – (c) Microsoft Corporation. Apache 2.0.
- Mocha (test framework) – (c) OpenJS Foundation and contributors. MIT.
- ESLint and @typescript-eslint – (c) OpenJS Foundation & Contributors. MIT.
- Node.js type definitions (@types/node) – DefinitelyTyped contributors. MIT.
- VS Code type definitions (@types/vscode) – Microsoft. MIT.
Tab / chord formatting inspiration: Community conventions as documented by Ultimate Guitar contribution rubric.
If you believe additional attribution is required for any component, please open an issue or pull request.
