diff options
author | Kevin Gimbel <hallo@kevingimbel.com> | 2020-03-23 16:01:46 +0100 |
---|---|---|
committer | Kevin Gimbel <hallo@kevingimbel.com> | 2020-03-23 16:01:46 +0100 |
commit | 93a80e20416d6d9438af72c0d458a501db734fef (patch) | |
tree | 3a153a10bd7f6cc771d192d7b0417dd20938d22f | |
parent | 0b0b6648e409d730071654e682977f87ba4e97e0 (diff) |
docs: Update README
-rw-r--r-- | README.md | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -12,6 +12,7 @@ - [Update Markdown file](#update-markdown-file) - [Command line](#command-line) - [Environment configuration](#environment-configuration) +- [Auto-run with VSCode](#auto-run-with-vscode) - [Performance](#performance) - [License](#license) <!-- END mktoc --> @@ -106,6 +107,25 @@ Place these variables in a shell environment file such as `~/.bashrc` or $ mktoc README.md ``` +## Auto-run with VSCode + +For VSCode the [Run on save](https://github.com/emeraldwalk/vscode-runonsave) extension can be used to trigger mktoc. + +Install the extension and then add the following config to workspace or user `settings.json`. + +```json +"emeraldwalk.runonsave": { + "commands": [ + { + "match": "\\.md$", + "cmd": "mktoc ${file}" + } + ] +} +``` + +This will run the command for every markdown file on safe. If there is no mktoc comment in the Markdown file nothing happens. + ## Performance `mktoc` is fast but can probably be even faster! Pull Requests and bug reports are appreciated! |