Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Roll20 Syntax Highlight - a Visual Studio Code Extension

1637610604

Edited 1637610938
Andreas J.
Forum Champion
Sheet Author
Translator
Roll20 Macros is an Extension for Visual Studio Code -text editor, to make roll20 macro and API command writing &amp; troubleshooting easier. Visual Studio Code is a free text editor for Windows/Linux/Mac. Visual Studio Code Marketplace - Roll20 Macros Report issues Changelog Sourcecode My patreon If you don't want to install VSCode, you can try out my extension right in your browser, by going to <a href="https://vscode.dev/" rel="nofollow">https://vscode.dev/</a> . Features Bracket pairing Autocompletes &amp; detects&nbsp; roll20-bracket syntax ( @{ } , ?{ } , %{ } , &amp;{ } ) correctly distinguished [[ ]] / {{ }} from [ [ ] ] / { { } } identifies 1st and 2nd order query nesting &amp; HTML replacement characters Syntax &amp; keyword highlights inline roll labels roll, macro &amp; API commands (e.g. /r , !example , #dex ) normal and fate ( dF ) die some keywords ( selected , target , %%NEWLINE%% , max , cf , ceil , tracker ) special characters used in macros (e.g. ~,|#=+ , and HTML replacement characters ) Examples Macro nesting bracket highlight Missing bracket stands out: Install 1. Install Visual Studio Code . 2. See Gif Use VScode shows/recognizes "rmacro"-syntax highlight when a file is saved with .roll or .rmacro suffix. Alternatively, if you create a new file, there is a "select language"-dropdown from where you can select "Roll20 Macros" from(see gif from the Install section). Try out in the browser 1. Go to <a href="https://vscode.dev/" rel="nofollow">https://vscode.dev/</a> 2. See gif from the Install section
1637610971
Andreas J.
Forum Champion
Sheet Author
Translator
(reserved for future use)
1637612872

Edited 1637614821
vÍnce
Pro
Sheet Author
Most excellent Andreas.&nbsp; Very useful foe anyone that uses VSC(it's free btw...) and does any macro creation/editing.
1637613522
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I've been trying it for a couple of weeks. Very helpful!
1637624190

Edited 1637624262
GiGs
Pro
Sheet Author
API Scripter
Nice! does it recognise javascript inside a roll20 script block in a html sheet? It's specifically for roll20 macros?
1637624531
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yeah, it makes keeping track of brackets much easier.
1637628385
Andreas J.
Forum Champion
Sheet Author
Translator
GiGs said: It's specifically for roll20 macros? Yes. It's the reason I made it. Might extend it to show the highlight in sheet code, and lots that could do better with highlights &amp; autocomplete.
1638215702
Andreas J.
Forum Champion
Sheet Author
Translator
Update from the weekend, should update automatically for anyone installing from the marketplace Roll20 Macors v1.0.3 collection of snippets added, like for default roll template, and example chat menu recognize $[[ ]] as brackets filetype icon added Roll20 Sheet Dev v0.1.1 (initial release) Also published first version of Roll20 Sheet Dev , extension to help with character sheet creation. Doesn't have that many features yet, but have lots of options to expand.