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

macro_included_in_two_separate_blocks.md (353B)


      1 # Including a macro in two separate blocks
      2 <!-- :Tangle(ruby) <^> DIRNAME/FILENAME.rb -->
      3 ```ruby
      4 def whatever
      5     <<block 1>>
      6     <<block 2>>
      7 end
      8 ```
      9 
     10 <!-- :Tangle(ruby) <> <block 1> -->
     11 ```ruby
     12 <<to include>>
     13 puts x
     14 ```
     15 
     16 <!-- :Tangle(ruby) <> <block 2> -->
     17 ```ruby
     18 <<to include>>
     19 x
     20 ```
     21 
     22 <!-- :Tangle(ruby) <to include> -->
     23 ```ruby
     24 x = "whatever"
     25 ```
     26