Beautify markdown code with Remark.
- Press
F1
and selectExtensions: Install Extensions
. - Search for and select
remark
.
See the extension installation guide for details.
- You can use global keyboard shortcut ALT+SHIFT+F or right-click context menu
Format code
. - Or press F1 and run the command named
Remark: Beautify markdown code
.
- Markdown
remark.format
- Type:
Object
- Default:
{}
Plugin configuration.
remark.format.plugins
- Type:
Array
- Default:
[]
- Example:
["github", "first-heading"]
A list globally or locally installed plugins that will be used with Remark (without remark-
prefix).
See remark/plugins.
About first run with this option
When you first run the plugin is looking for an installed plugins. Therefore, the first run may take a long time. Subsequent runs are much faster.
remark.format.rules
- Type:
Object
- Default:
{}
- Example:
{ "closeAtx": true }
Remark formatter rules.
See remark/options or use intellisense in VS Code:
remark.format.plugin-name-without-prefix
- Type:
Object
- Default:
null
- Example:
"github": { "repository": "https://github.com/mmrlnc/vscode-remark" }
Configurations for plugins, if they are needed.
Unfortunately, some plugins do not give correct errors. So when you see the following error (see image), then most likely a bug in the wrong settings of any of the plugins.
{
"remark.format": {
"plugins": [
"first-heading"
],
"first-heading": {
"heading": 123
}
}
}
Many plugins correctly give an error. For example:
{
"remark.format": {
"plugins": [
"github"
]
}
}
Therefore, if you are experiencing problems with this extension, please create issue on GitHub repository.
Tip
You can see a detailed error report in the Developer Tools (
Help -> Toggle Developer Tools
). Please do not forget to attach it to your issue.
For changes keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts
:
{
"key": "ctrl+shift+c",
"command": "remark.reformat"
}
See the Releases section of our GitHub project for changelogs for each release version.
This software is released under the terms of the MIT license.