
Roll20 Macros is an Extension for Visual Studio Code-text editor, to make roll20 macro and API command writing & troubleshooting easier. Visual Studio Code is a free text editor for Windows/Linux/Mac.
If you don't want to install VSCode, you can try out my extension right in your browser, by going to https://vscode.dev/.
Features
Bracket pairing
- Autocompletes & detects roll20-bracket syntax (
@{ }
,?{ }
,%{ }
,&{ }
) - correctly distinguished
[[ ]]
/{{ }}
from[ [ ] ]
/{ { } }
- identifies 1st and 2nd order query nesting & HTML replacement characters

Syntax & keyword highlights
- inline roll labels
- roll, macro & 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 https://vscode.dev/
2. See gif from the Install section