Ox for Visual Studio Code
This extension provides rich language support for Ox.
If you are new to VS Code see Getting started with Visual Studio Code
- OxMetrics 8 or above.
- Windows 64 bits, MacOS or Linux 64 bits
After installation, the extension setting
oxmetricsFolder must be set to the folder path of oxmetrics.
- Windows :
- MacOs :
- Linux :
You can change the extension setting via :
OxCode (see Setting)
A reload of Visual Studio Code is needed to complete installation.
- Command to run a
.ox code (right click, and click
- Syntax Highlighting
- A problem matcher is implemented to quickly jump to errors.
- Documentation generation (javadoc style)
- region folding ( via
Autocompletion is provided as you type, after
[.] (while calling a function ) or
[this.] (inside a member function).
Signature Help is given after a parenthesis
(. If the function declaration is documented with a javadoc comment, then the documentation is displayed.
A basic linter rule is currently supported :
- Check for unused local variables.
To run the linter, right click an ox file, click
Show All Commands and
OX Lint my code.
Go To Implementation
Go To Implementation (or Peek) is supported for functions (
CTRL + Shift + F12).
Go To Definition
Go To Definition (or Peek) is supported for functions:
||parallel for loop
||initialize an ox code
Documentation for function can automatically be inserted by inserting
The extension provides several commands in the Command Palette for working with Ox files:
Ox Compile and Link to compile the current ox file and link
Ox Compile to compile the current ox file
Ox Stop to stop the running ox session
Ox Clean .bak files to delete .bak files that are in the current directory
Ox Lint my code to lint the current file
Ox Help to open the official ox help
Ox Open file with oxmetrics to open a file in oxmetrics
Ox Run to run the current file
Ox OxRun to run the current file using OxRun (for graphics)
Ox Run in terminal to run the current file via a terminal
You can access all of the above commands from the command palette (
This extension contributes the following settings:
oxcode.astyleOptions: see Astyle options (default :
--pad-header --break-blocks --pad-oper --style=java --delete-empty-lines --unpad-paren)
oxcode.oxmetricsFolder: The path to the root folder of oxmetrics .
oxcode.checkSyntaxOnSave: If true, check the syntax on save (default : true).
oxcode.completion: True to enable completion (default : true).
oxcode.signature: True to enable signature Help (default : true).
- Does this extension use any online services?
- No, this extension is self contained. It doesn't use any telemetry services.
- How to report a bug ?
- via the github repository. If you can fix it, feel free to send us pull requests. However, please note that the command-line executable is a closed-source software.
- Does this extension support prior version of OxMetrics ?
- It has not been tested, but it should work.
- How to request a feature ?
- via the github repository, don't hesitate: all comments are welcome !
Tips and Tricks
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"label": "Run ox",
Format Document doesn't work properly when the ox file contains a nested comment.
This extension: The MIT License (MIT)
OxLinter : copyright Prolept, this extension relies heavily on a command line executable named
OxLinter (freeware) that is bundled with this extension.
Please note that futures versions of this extension may be commercialized.