By placing your cursor anywhere in the code block above and running :EvalBlock, Medieval will print the result of evaluating the block (in this case,

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-26 12:30:06

By placing your cursor anywhere in the code block above and running :EvalBlock, Medieval will print the result of evaluating the block (in this case, it will echo "Hello world!")

You can send the output of evaluation into another code block, allowing you to do a primitive style of literate programming. You can accomplish this by adding a "target" parameter to your code block and creating a second code block with a "name" parameter. The output of the evaluation of your code block will be redirected to the targeted block. For example:

Medieval does not create any mappings by default, but you can easily create one yourself by adding the following to the file ~/.vim/after/ftplugin/markdown.vim (create it if it does not yet exist):

For now, Medieval only works in Markdown buffers. If you'd like to see support added for other file types, please see the Contributing section.

Please feel free to contribute changes or bug fixes. You can send patches to git@gpanders.com or submit a pull request on GitHub.

Leave a Comment