Ob-tmux is an Emacs library that allows org mode to evaluate code blocks in a tmux session.
Ob-tmux is useful for keeping notes on how to perform tasks in the terminal, especially when some interactivity is required. The functionality can be used to document software installation, build instructions, and administrative tasks. The documentation can be tested and adjusted while it is written.
This repository is forked from ob-tmux main repository where a full documentation can be found. In addition to the features already proposed in ob-tmux I added a polymode for ob-tmux that can be used to enjoy language dependent behavior in the source blocks.
This includes:
- indentations
- syntax highlighting
- lsp-mode
…
I use this mainly for shell and python blocks, I also made a few changes to the main ob-tmux features to accomodate python. The polymode is declared locally on each file so as not to polute all my org files.
Example of org-mode file (look in raw, this does not render well in github):
python
import numpy as np
from matplotlib import pyplot as plt
for f in range(3):
print(f)