Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SCPI Text File Syntax HighlightingNew to Visual Studio Code? Get it now.
SCPI Text File Syntax Highlighting

SCPI Text File Syntax Highlighting

Eliam Calvo

|
184 installs
| (0) | Free
Syntax highlighting for SCPI command scripts in .txt files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SCPI Text File Syntax Highlighting

Syntax highlighting for SCPI command scripts stored in .txt files, with extra support for simple scripting patterns used in automated VISA workflows.

Features

  • Highlights common SCPI-style control words and script keywords.
  • Highlights numeric values, including optional scientific notation and units (hz, khz, mhz, ghz).
  • Highlights placeholders like {channel} and keeps placeholder highlighting inside single-quoted strings.
  • Supports line comments with //.
  • Adds bracket pairing and auto-closing for (), [], {}, and single quotes.
  • Enables Ctrl+/ line commenting when editing SCPI files.

File Association

This extension currently associates the scpi language mode with .txt files.

If you open a plain text file that contains SCPI commands, it should automatically receive SCPI highlighting.

Example

// Instrument connection
TCPIP 192.168.1.100

var channel
channel = 1

IF channel == 1 AND 1.0e3khz >= 100hz
	MEAS:VOLT? {channel}
ENDIF

Supported Patterns

  • Comments: // ...
  • Numbers: integers, decimals, scientific notation, optional frequency units
  • Placeholders: {name}
  • Declarations: var, vars
  • Flow/control words: FORLOOP, END, IF, ENDIF, WHILE, ENDW, BREAK, BREAKPOINT
  • Operators/tokens: ==, !=, >=, <=, ,, AND, OR

Keyboard Shortcut

  • Toggle line comment: Ctrl+/ (when editorLangId == scpi)

Extension Settings

This extension does not currently contribute custom settings.

Release Notes

See CHANGELOG.md for version history and updates.

Development

Prerequisites

  • Node.js 20+
  • VS Code 1.96+

Install dependencies

npm install

Build

npm run compile

Watch mode

npm run watch

Lint

npm run lint

Test

npm test

Run in Extension Development Host

  1. Open this project in VS Code.
  2. Press F5 to launch a new Extension Development Host window.
  3. Open a .txt file with SCPI commands and verify highlighting.

Publishing

The extension is configured with publisher EliamCalvo and package name scpi-visa-text-extension.

Before publishing:

  1. Update version in package.json.
  2. Add notes to CHANGELOG.md.
  3. Package and publish using your preferred VS Code extension publishing workflow.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft