commit d0b337fb09f31536ef836531b0893c135867bc50
parent d3578ef7c2e19a2721ed559adcba7acbd49b464f
Author: Alex Balgavy <alex@balgavy.eu>
Date: Sat, 26 Feb 2022 18:41:44 +0100
Fix load guard in ftplugin
Diffstat:
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim
@@ -2,7 +2,6 @@
if exists('g:loaded_literate_markdown')
finish
endif
-let g:loaded_literate_markdown = 1
command -buffer -bar Tangle call literate_markdown#Tangle()
diff --git a/examples/literate_markdown_ftplugin.md b/examples/literate_markdown_ftplugin.md
@@ -16,13 +16,13 @@ The general structure of the file is:
The load guard lets the user disable the autoloaded functions by setting the variable `g:loaded_literate_markdown`.
If it's set, the entire file is skipped.
+I don't want to set it here, because otherwise it will only run once, and I want it to run every time a markdown file is loaded.
<!-- :Tangle(vim) <load guard> -->
```vim
if exists('g:loaded_literate_markdown')
finish
endif
-let g:loaded_literate_markdown = 1
```
## Commands