Script snippets
Set the file environment to a script type to run on expand and insert stdout. This is Pro (codeExecution). Interpreter paths live in Settings → Custom runtimes.
Environments
| Env | Platform | Notes |
|---|---|---|
| JavaScript | All | Built-in / plugin JS runtime |
| Shell | macOS / as configured | Do not concatenate untrusted input into the command line |
| Python | Needs a local Python | Custom runtime can point at a binary |
| AppleScript | macOS | — |
| PowerShell | Windows | — |
| Custom | Your executable | Add a runtime in Settings |
FillIn still runs first, then the filled text is available to the script. Nested %s:abbr% expands before execute (failures notify; the frontmost document should stay intact).
Create one
- New snippet, pick a script environment.
- Print the insertion text to stdout.
- Save and test the abbreviation.
Need a small window? That is a plugin snippet. See Plugin Hub.
Related
Last updated