PXPlus language support for VS Code, focused on reading and navigating PxPlus code.
Features
Syntax highlighting
- TextMate grammar for PxPlus (
.pxprg,.pxp,.pvp,.pvx,.pvc,.bbx) - Sensible default token colors that work with any dark theme (comments, strings, numbers, flow keywords like
GOSUB/RETURN/PERFORM, labels, variables, classes) — applied only to PxPlus token scopes, never to other languages, and without changing your color theme - Editor decorations for labels (
LABEL:), special headers (NAME:!), and special block regions up to their closingRETURN - Virtual indentation — lines inside loops and
LABEL:…RETURNroutine bodies are visually shifted per nesting level without modifying the file (pxplus.virtualIndent.enabled/pxplus.virtualIndent.size) - PxPlus globe file icon for PxPlus files
- Owns a private
pxplus-merplanguage id so highlighting never conflicts with other installed PxPlus extensions
Typing aids
- Smart Enter — pressing Enter on a numbered line inserts the next line number (inferring the step from nearby lines, splitting gaps, and renumbering following lines when the gap runs out); toggle with
pxplus.autoInsertLineNumbersOnEnter - Paste numbering — multi-line pastes of unnumbered code get line numbers continuing from the line above
PXPlus: Renumber Line Numberscommand resequences the whole file- Completions — statement snippets (
if,for,while,repeat,select,fh open/fh close,gosub, …) whose extra lines are numbered to match the file, plus keywords, built-in functions/system variables with docs,err=/dom=/key=clauses inside I/O parens,PERFORM "FILE;ROUTINE"file & routine names, andOBJ'class members - Signature help for built-in functions and class methods
- Hover docs for keywords, built-ins, and
PERFORM "FH;…"commands PXPlus: Insert Routine Shellcommand scaffolds a routine (optionally numbered viapxplus.includeLineNumbersInSnippets)
Navigation
- Outline / breadcrumbs — labels, routines, functions, classes, and properties (class members grouped under their class)
- Jump to routine or label —
Ctrl+Alt+Oquick pick - Go to definition (
F12/ Ctrl+Click)- labels and
GOSUBtargets GOTO 1234numbered linesPERFORM "FILE;ROUTINE"/CALL "FILE;ROUTINE"into other workspace filesRUN/LOAD/SAVE "FILE"referencesOBJ'MEMBERclass members (resolvesNEW("Class")andLIKE "Parent"chains)
- labels and
- Find references (
Shift+F12) across open and workspace PxPlus files - Workspace symbol search (
Ctrl+T) across all PxPlus files - Clickable links on
PERFORM/CALL/RUN/LOAD/SAVEfile names - Folding for
LABEL:…RETURNroutines, special blocks, andIF/FOR/WHILE/REPEAT/SELECT/SELECT … NEXT RECORDblocks - Hover previews of local labels/routines and class member signatures
Stage in WindX session (Windows only)
- Stage button in the editor title bar (also
Ctrl+Alt+R) sends the current file into a running WindX session:l <name>→delete 1,65000→ the program body — then you run/save it in the session yourself - Any program size — the program is pasted in chunks under WindX's clipboard limit (
pxplus.run.pasteChunkBytes); each chunk ends withserial "[WDX]…"so the host acknowledges the chunk by creating a local file before the next one is sent (no timing guesses; falls back to timed delays ofpxplus.run.pasteLineDelayMsper line if[WDX]writes are blocked) - Multi-session aware — finds every running
pxplus.exe, reads the launcher-arg(e.g.MERP-D5,MERP-QA) from its command line, and shows a picker when more than one is open; the chosen target is remembered per workspace and shown in the status bar (click to switch) - Targets matching
pxplus.run.confirmTargets(defaultPROD/PRD) require a modal confirmation before anything is sent - Assumes the target session is sitting at the ads ready prompt; the paste replaces the program in session memory and overwrites the Windows clipboard
- Settings:
pxplus.run.processName,pxplus.run.loadProgramFirst,pxplus.run.sessionLabels,pxplus.run.confirmTargets
Development
npm install
npm run build # bundle to dist/index.cjs
npm run dev # watch mode (used by F5 launch)
npm run ext:package # build the .vsix
Press F5 with the repo root open in VS Code to launch an Extension Development Host (the launch config lives in the repo root's .vscode/).