Extension¶
Extensions are presented by use.
Creating a table of contents for markdown files (.md)¶
Use "Markdown All in One".
Repository¶
https://github.com/yzhang-gh/vscode-markdown
Usage¶
Launch the command palette and execute "Markdown All in One: Create Table of Contents (TOC)".
A table of contents (some parts are omitted) will be created as follows.
1 2 3 4 |
|
By default, the title and table of contents are also output.
In the settings, you can set a list of headings to be excluded from the table of contents (TOC) of the project file, but the wording changes from project to project, so it is not possible to set the wording? If regular expressions can be used, it may be possible, but I have not tested it yet.
1 |
|
If the title and table of contents are not needed, they can be deleted and lettered up.
In Windows:
- Decrease the level of indentation: "Ctrl+]" or "Tab
- Increase the level of indentation: "Ctrl+[" or "Tab+Shift
Or you can select a rectangle of text and adjust it.
Reference(Japanese: VS Codeでテキストを矩形選択するには
Check marMarkdown syntax and style¶
Use "markdownlint".
markdownlint is a VSCode extension that includes a library of rules that promote standards and consistency in Markdown files.
Repository¶
https://github.com/DavidAnson/vscode-markdownlint
Usage¶
Intentionally turn off Markdown check items¶
Reference(Japanese): markdownlint Intentionally turning off Markdown check items¶
(https://qiita.com/miriwo/items/132750876e37df26e976)
markdownlint Markdown checklist changes (settings.json)¶
1 |
|
If the default settings succeed, the following will be reflected in the user-specified setting.json
. (The same applies for other languages)
1 2 3 |
|
If changed to markdown-all-in-one
it will change.
1 2 3 |
|
Disabled markdownlint Markdown check items (markdownlint.config)¶
The settings used are as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Modify on a file-by-file basis¶
1 |
|
Correct when saving the file.¶
1 |
|
Info
- If it does not run, check if
Editor: Format On Save
is enabled. - settigs.json:
"editor.formatOnSave": true,
Multilingual Oriented Formatter¶
markdownlint is a formatter for Markdown, but there is also an extension called Prettier that supports html, javascript, etc.
Usage¶
Similar to the use of markdownlint.
Info
- The formate target includes Markdown, but there are a few cases where unintended conversions are not performed. (It may be possible to work around this depending on your settings, but this has not been confirmed.)
- If you want to format Markdown files, markdownlint is a good choice.