dbridges / vim-markdown-runner Goto Github PK
View Code? Open in Web Editor NEWEasily execute markdown fenced code blocks in vim
Easily execute markdown fenced code blocks in vim
Hi,
I often start my documentation with the following block
export username="John DOE"
and then use those variables.
echo "Hello $username"
but I lose my username
variable.
Is there a solution to keep the same session ?
(while the document is opened)
Regards,
LeNouveau
Hi, thank you for the nice plugin.
It would be great if one could write some code callable from code blocks below. For instance, for python one could write all necessary libraries in a code block,
import numpy as np
and be able to use the library in the next code block,
a = np.array([1,2])
Do you think it would be easy to implement?
Thanks for this convenient plugin!
I use:
let g:markdown_runners = {'py' : 'ipython'}
If I run the following py
block
a
I get:
^[[22;0t^[]0;IPython: inf2/inf2-notes^GPython 3.9.4 (default, Apr 20 2021, 15:51:38)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.23.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: ^[[0;31m---------------------------------------------------------------------------^[[0m
^[[0;31mNameError^[[0m Traceback (most recent call last)
^[[0;32m<ipython-input-1-3f786850e387>^[[0m in ^[[0;36m<module>^[[0;34m^[[0m
^[[0;32m----> 1^[[0;31m ^[[0ma^[[0m^[[0;34m^[[0m^[[0;34m^[[0m^[[0m
^[[0m
^[[0;31mNameError^[[0m: name 'a' is not defined
In [2]: Do you really want to exit ([y]/n)?
^[[23;0t
As far as I understand, vim does not interpret the ANSI color sequences like a terminal, but it is possible to open a terminal inside vim using :term
. Is it possible to forward the filter output to a terminal window?
Lastly: a workaround in my case is to use:
let g:markdown_runners = {'py' : 'ipython --colors NoColor'}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.