vim-literate-markdown

A Vim plugin to replicate a subset of Org mode's literate programming, for Markdown files.
git clone git://git.alex.balgavy.eu/vim-literate-markdown.git
Log | Files | Refs | README

commit a494f8c891c3bae268aeb74ccf70bd1bf3a98c9a
parent 9fc11909e238a7ff8efdb65682490ea7fc8fc2c0
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Thu, 14 Apr 2022 14:40:26 +0200

Small changes

Diffstat:
Mexamples/literate_markdown_autoload.md | 6++++++
Mtests/all_in_one_file.md | 1+
Mtests/example_1.md | 2+-
Mtests/two_different_languages.md | 1+
4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/examples/literate_markdown_autoload.md b/examples/literate_markdown_autoload.md @@ -5,6 +5,12 @@ While in the case of a larger project like this, it is perhaps not ideal and may Commands and bindings are defined in the [ftplugin](literate_markdown_ftplugin.md). +Todo: +- shouldn't be able to specify both `<^>` and `<>` +- shouldn't allow two different top-level `<^>` (I think), unless tangling to different files +- order in tangle directive should be more or less arbitrary? need to define a grammar. +- squash whitespace where needed, see tests + The general structure of the file is: <!-- :Tangle(vim) <^> --> diff --git a/tests/all_in_one_file.md b/tests/all_in_one_file.md @@ -1,3 +1,4 @@ +# Different languages, all tangled to the same file <!-- :Tangle DIRNAME/FILENAME.out --> This file is a collection of different languages. They should all end up in the same output file. diff --git a/tests/example_1.md b/tests/example_1.md @@ -1,5 +1,5 @@ # Example 1 -Example 1 from Vim documentation. +Example 1 from the Vim documentation. <!-- :Tangle(ruby) DIRNAME/FILENAME.rb --> diff --git a/tests/two_different_languages.md b/tests/two_different_languages.md @@ -1,3 +1,4 @@ +# Two different languages tangled to two different files Here we have two different languages, which should be tangled to two different files. <!-- :Tangle(python) DIRNAME/FILENAME.py --> <!-- :Tangle(ruby) DIRNAME/FILENAME.rb -->