Syntax highlighting and diagnostics for Mplus statistical software in Visual Studio Code.

Features
Comprehensive Syntax Highlighting for .inp and .out files:
- Section Headers —
TITLE:, DATA:, VARIABLE:, MODEL:, ANALYSIS:, OUTPUT:, PLOT:, SAVEDATA:, MONTECARLO:
- Model Operators —
BY, ON, WITH, PWITH, XWITH, IND, VIA, MOD, AT, NEW
- Estimators —
ML, MLR, MLM, WLSMV, BAYES, ULS, and more
- Analysis Types —
TWOLEVEL, MIXTURE, EFA, ESEM, RANDOM, COMPLEX
- Functions — Mathematical (
ABS, EXP, LOG, SQRT), Statistical (MEAN, VARIANCE, SUM), Distributions (NORMAL, POISSON, BINOMIAL)
- Rotation Methods —
GEOMIN, PROMAX, VARIMAX, OBLIMIN, TARGET, BIFACTOR
- Comments — Lines starting with
!
- Strings & Numbers — Quoted text and numeric values
- Variable Ranges —
y1-y6 style notation
- Constraint Labels — Parameter labels like
(a1), (loading)
Real-time Diagnostics as you type:
- Typo Detection — Warns about misspelled keywords (e.g.,
USEVARIABLE → USEVARIABLES)
- Missing Semicolons — Flags unterminated statements
Supported Files
| Extension |
Description |
.inp |
Mplus input files |
.out |
Mplus output files |
Example
TITLE: Confirmatory Factor Analysis
DATA:
FILE IS mydata.dat;
VARIABLE:
NAMES ARE y1-y6;
USEVARIABLES ARE y1-y6;
CATEGORICAL ARE y1-y6;
ANALYSIS:
ESTIMATOR = WLSMV;
MODEL:
f1 BY y1-y3;
f2 BY y4-y6;
f1 WITH f2;
OUTPUT:
STDYX;
MODINDICES(3.84);
Installation
- Open Extensions in VS Code (
Ctrl+Shift+X)
- Search for "Mplus Syntax Tools"
- Click Install
Or install via command line:
code --install-extension paulinadupin.mplus-syntax-tools
Requirements
No additional dependencies required. Works out of the box with any Mplus .inp or .out file.
Release Notes
1.0.2
- Expanded keyword coverage for DATA, VARIABLE, ANALYSIS, OUTPUT sections
- Added distribution functions and rotation methods
- Added support for constraint labels
- Improved README with detailed features
1.0.1
1.0.0
- Initial release with syntax highlighting and diagnostics
Contributing
Found a missing keyword or bug? Open an issue on GitHub.
License
MIT
| |