summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Gimbel <hallo@kevingimbel.com>2020-03-23 16:01:46 +0100
committerKevin Gimbel <hallo@kevingimbel.com>2020-03-23 16:01:46 +0100
commit93a80e20416d6d9438af72c0d458a501db734fef (patch)
tree3a153a10bd7f6cc771d192d7b0417dd20938d22f
parent0b0b6648e409d730071654e682977f87ba4e97e0 (diff)
docs: Update README
-rw-r--r--README.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/README.md b/README.md
index d9de7fc..9fc545f 100644
--- a/README.md
+++ b/README.md
@@ -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!