sponsor Vim development Vim logo Vim Book Ad

litrepl : Markdown/LaTeX code snippet execution plugin

 script karma  Rating 4/1, Downloaded by 215  Comments, bugs, improvements  Vim wiki

created by
Sergei Mironov
 
script type
utility
 
description
This script interfaces the Litrepl tool which executes Markdown/LaTeX code snippets by forking standalone interpreters.
For instance, when entering `:LEval` on the following Python code snippet:

``` python
print("Hello!")
```

the contents of the next result section will be replaced with a string "Hello!" :

``` result
Hello!
```

In other words, this is a text-mode Jupyter Notebook with no custom xmls and web-servers involved.

The Python interpreter will be running in the background waiting for new snippets to evaluate. The interpreter is shared
among the files of the same directory.
(For LaTeX code section formatting, please check the repository docs).

Supported code section labels:

* `python` sections - default `Python` or the enhanced `IPython` interpreter
* `ai` sections - `Aicli` console for talking with AI language models

Command basics:

* `:LEval` - Evaluate the section under the cursor.
* `:LStatus` - Show the status of the interpreters.
* `:LRestart` - Restart the background interpreter.
 
install details
1. Install the Litrepl tool by `pip install litrepl`.
2. Unpack the tarball and put `litrepl.vim` into the `~/.vim/plugin` folder.

Please visit https://github.com/sergei-mironov/litrepl for details and additional options.

Note: Litrepl tool relies on POSIX OS interface and was tested on Linux only. The author is interested in getting
feedback from MacOS and WSL users! In any case, feel free to open Github issues.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-litrepl-3.7.0-b950648.tar.gz 3.7.0 2024-08-24 9.0 Sergei Mironov Verbatim `<!--ai-->/<!--noai--><!--result-->/<!--noresult-->` markdown markup is now supported; Old-style conflicting `<!--code` options are removed;
vim-litrepl-3.5.3-c42c33f.tar.gz 3.5.3 2024-08-03 9.0 Sergei Mironov Fix `LTerm` command, Improve error reporting
vim-litrepl-3.5.2-25fb9d6.tar.gz 3.5.2 2024-08-03 9.0 Sergei Mironov Improve error reporting
vim-litrepl-3.5.1-4f84c7e.tar.gz 3.5.1 2024-08-03 9.0 Sergei Mironov Initial upload
ip used for rating: 3.236.112.101

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github