An introduction to wrapping your favorite command-line programs as neovim plugins. Requires neovim 0.10.2, and each individual example may have additional dependencies.
- High level overview of CLIs
- How to run programs and get back data in neovim
- Building a wrapper around
curl
to display the temperature (using JSON) - Embedding
top
in a floating window usingvim.fn.termopen()
- Running
firefox
headless, navigating to a website, and displaying the website in neovim - Creating a tiny UI in a buffer to engage with
sapling
Install presenterm 0.9.0.
Once the dependencies are installed, run the presentation:
./presentation.sh
- Read more about temperature to see how
single action command line utilities can be wrapped. In this example,
temperature information for a city is pulled from https://wttr.in using
curl
. - Read more about top to see how interactive
command line utilities can be wrapped. In this example,
top
is used to illustrate embedding an interactive program into neovim via terminal. - Read more about webview to see how streaming command line utilities can be wrapped. In this example, firefox is remote controlled to load websites and display screenshots of them in neovim.
- Read more about sapling to see how to build
a buffer to interact with
sapling
, a source control manager, to switch between commits.
Each example can be launched with neovim by leverage -u
with the path to the
script:
nvim -u scripts/000_all.lua # Loads all of the examples
nvim -u scripts/001_temperature.lua # Loads the temperature example
nvim -u scripts/002_top.lua # Loads the top example
nvim -u scripts/003_webview.lua # Loads the webview example
nvim -u scripts/004_sapling.lua # Loads the sapling example