CALPUFF INP Syntax Highlighter
This extension provides syntax highlighting for CALPUFF .inp files using a custom TextMate grammar.
Features
- Highlights lines of the form
! VARIABLE = VALUE ! in different colors (variable vs. value).
- Treats lines starting with
! as comments.
Installation
- Install Node.js, then run
npm install -g vsce .
- In this folder, run
vsce package .
- In VS Code, go to Extensions → “Install from VSIX...” → select the generated
.vsix .
- Open any
.inp file to see the highlighting.
Configuration
To customize the highlighting colors, add this to your user settings.json :
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "variable.name.calpuff",
"settings": {
"foreground": "#ffa500",
"fontStyle": "bold"
}
},
{
"scope": "variable.value.calpuff",
"settings": {
"foreground": "#66ccff"
}
},
{
"scope": "comment.line.exclamation.calpuff",
"settings": {
"foreground": "#aaaaaa",
"fontStyle": "italic"
}
}
]
}
| |