Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>MTRGen templates support - Syntax Highlighting and File CreationNew to Visual Studio Code? Get it now.
MTRGen templates support - Syntax Highlighting and File Creation

MTRGen templates support - Syntax Highlighting and File Creation

Matronator

| (0) | Free
Adds syntax highlighting for MTRGen templates and a command to create files from MTRGen templates.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

logo

MTRGen templates support - Syntax Highlighting and File Creation

This extension provides syntax highlighting to template files for MTRGen (matronator/mtrgen-js) templates. It also provides a command to create files from MTRGen templates.

Features

  • Syntax highlighting for MTRGen templates
  • Snippets for MTRGen templates
  • File creation from MTRGen templates
  • Command to create files from MTRGen templates

Create files from MTRGen templates

This extension adds a button to the file explorer and a coresponding command to create files from MTRGen templates. Just run the command MTRGen: Create File from MTRGen Template and select a template from the list. If you have no MTRGen templates, the extension will create a .mtrgen folder in your project root and prompt you to create a new template.

Snippets

The extension provides common snippets for MTRGen templates. The following snippets are available: REDřwrtqwcznrzkibu n'mtew | Snippet | Description | Example output | |-------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------| | header, ---, mtr | Creates MTRGen header block |

--- MTRGEN --- 
name: foo
filename: bar
path: baz
--- /MTRGEN ---
| | if | Creates an if statement block |
<% if true %> 
...
<% endif %>
| | ifelseif, ifei | if statement block with elseif block |
<% if true %> 
...
<% elseif false %>
...
<% endif %>
| | ifelse, ife | if statement block with an else block |
<% if true %> 
...
<% else %>
...
<% endif %>
| | ifelseifelse, ifeie | if statement block with elseif and else blocks |
<% if true %> 
...
<% elseif false %>
...
<% else %>
...
<% endif %>
| | else | else block |
<% else %> 
...
<% endif %>
| | elseif, elif | elseif block |
<% elseif false %> 
...
<% endif %>
| | comment, #, // | Comment block |
<# This is a comment #>
| | for | for loop block |
<% for item in items %> 
...
<% endfor %>
| | first | first block |
<% first %> 
...
<% endfirst %>
| | last | last block |
<% last %> 
...
<% endlast %>
| | sep | sep block |
<% sep %> 
...
<% endsep %>
| | empty | empty block | <% empty %>
...
<% endempty %> |

Supported languages

This extension adds language support for these languages natively or with support from third-party extensions:

  • C
  • C++
  • C#
  • Clarity
  • CSS
  • Dart
  • Dockerfile
  • Elixir
  • Elm
  • Erlang
  • Gleam
  • Go
  • Haskell
  • Haxe
  • HTML
  • Java
  • JavaScript (including React)
  • JSON
  • Julia
  • KDL
  • Kotlin
  • Less
  • Lisp
  • Lua
  • Markdown
  • Nim
  • Objective-C
  • OCaml
  • Odin
  • Perl
  • PHP
  • PowerShell
  • Python
  • Ruby
  • Rust
  • Scala
  • SCSS
  • Shellscript
  • Solidity
  • Swift
  • Terraform
  • TOML
  • TypeScript (including React)
  • XML
  • YAML
  • Zig

License

This extension is released under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft