Numbl for VS Code
Run .m scripts directly in VS Code using numbl.
Features
- Run button in the editor title bar for
.m files
- Text output displayed in the Numbl output channel
- Figures and plots rendered in a webview panel — line/scatter, 3D surfaces & meshes,
imagesc, pcolor, contour, bar/bar3, area, errorbar, quiver, pie, box, heatmap, patch, and uihtml components
- Error diagnostics shown as inline squiggles with file and line info
- Keyboard shortcut:
Ctrl+Shift+R to run the current script
Requirements
numbl must be installed and available on your PATH:
npm install -g numbl
For optimal performance with linear algebra operations, build the native addon:
numbl build-addon
Updating numbl
To upgrade to the latest version of numbl:
npm install -g numbl@latest
The extension will notify you when a newer version is available on npm.
Configuration
| Setting |
Default |
Description |
numbl.command |
"numbl" |
Command prefix for running numbl. Examples: "numbl", "npx numbl", "npx tsx /path/to/src/cli.ts" |
numbl.extraPaths |
[] |
Additional workspace directories passed to numbl via --path |
The script's own directory is added to the numbl workspace automatically.
Usage
- Open a
.m file
- Click the play button in the editor title bar (or press
Ctrl+Shift+R)
- Output appears in the "Numbl" output channel
- Figures appear in a side panel
Reporting issues
| |