Vim plugin for experimental shell sessions -- save a session for later/others and search/modify output with the power of vim.
It is different to the :terminal command for two main reasons:
- You run commands anywhere in the file.
- The buffer corresponds to a standard file on disk.
It can also be thought of as an interactive version of script(1) -- interactive because you can go back and modify what's stored while you work -- that facilitates re-running the same session during reading.
Benefits are mainly around exploratory terminal sessions, where you want to
- Keep a clean record of what you did, for record keeping.
- This often means removing output from unimportant
--help
commands.
- Easily repeat those actions you performed -- whether restarting a python REPL or GDB session, re-running a manual inspection you have not yet formalised into an automatic testcase, or re-running a shell session given to you (by yourself a year ago or by your collegue) that demonstrates a behaviour or reproduces a bug.
- Search through and modify output of commands with Vim shortcuts.
- Write notes/annotations alongside commands for others to understand what's going on.
- Prepare and replay a live demo (see my presentation on GDB walkers).
Some demos are provided in the links below.
Requires vim with patch 8.0.0764 or nvim version 0.2.