evim is a CLI-launched Markdown previewer for local .md files. It opens a
small local desktop browser shell, renders Markdown with images and LaTeX, and
outsources editing to Vim in a terminal.
From a published GitHub release:
curl -fsSL https://raw.githubusercontent.com/ryangerardwilson/evim/main/install.sh | bashFrom a source checkout:
npm install
ln -sfn "$PWD/evim" "$HOME/.local/bin/evim"Make sure ~/.local/bin is on your PATH.
evim
evim notes.md
evim ~/Documents/notes.md
evim -h
evim -v
evim -uRunning evim with no file shows recent .md files, an option to create a
named Markdown document, and an option to open an existing .md file by path.
There is no untitled scratch document.
In that flow, the document name is the filename. A path without a .md suffix
is treated as a directory, so hello.md plus ~/Documents/evim creates
~/Documents/evim/hello.md.
In the recent-file screen, n starts the new-document flow and o opens the
path-entry flow. Path fields support Tab and Ctrl+I completions.
Each evim <file> command starts its own local server on the first available
port at or above 8000, so multiple Markdown files can be open at the same
time.
jandkscroll the Markdown preview.- Holding
jorkstacks repeated scroll steps. Ctrl+JandCtrl+Kscroll half a page down or up, and repeat when held.ggandGscroll to the top and bottom.itoggles the heading index. In the index,jandkmove through headings, andEnterjumps to the selected heading.Enteropens the current file in Vim in a terminal.rreloads the Markdown from disk.?toggles the shortcut overlay.EscorCtrl+[closes overlays or command mode.:opens the command line.Ctrl+Cexits evim entirely.:editopens the current file in Vim.:38opens the current file in Vim at line 38 and centers that line.:e <name>opens another.mdfile in the current document directory.:rreloads from disk.:lockasks the browser shell for keyboard lock.
Markdown image references such as  are resolved
relative to the Markdown file. Block LaTeX is rendered from $$ ... $$, and
inline LaTeX is rendered from $...$.
Equation plots can be embedded with JavaScript-backed evim-plot code fences:
```evim-plot
plot.func({
x: [-6, 6],
samples: 500,
series: [
{ label: "sin(x)", y: x => sin(x), color: "cyan" },
{ label: "0.2x^2 - 1", y: x => 0.2 * x * x - 1, color: "#facc15" }
],
title: "Equations"
})
```The plot runtime is sandboxed and supports plot.func, plot.points,
plot.coords, plot.parametric, plot.linspace, and direct Math helpers
such as sin, cos, PI, and sqrt. Series can set color, stroke, or
lineColor with a safe named color, hex color, or rgb(...) value. Named
colors include white, gray, red, orange, yellow, green, cyan,
blue, violet, purple, and pink.
While typing in setup or command fields, Ctrl+M acts as enter, Ctrl+I acts
as tab, and basic Emacs-style bindings such as Alt+F, Alt+B, Ctrl+H,
Ctrl+W, Ctrl+A, and Ctrl+E are handled by the editor.
Documents are plain Markdown files with a .md suffix. There is no JSON
document format.
When launched from the CLI, the server restricts reads and writes to the opened
document directory and the app's internal documents/ directory.
To choose a terminal or editor explicitly:
EVIM_TERMINAL=alacritty EVIM_EDITOR=nvim evim notes.mdnpm install
npm run devThe development server runs at:
http://localhost:8000
The plain web server opens the same name and path flow when no file is supplied. The CLI is the normal path for opening a specific document:
npm run cli -- notes.mdRun the desktop shell directly when debugging Electron behavior:
npm run desktopThe public docs site lives in docs_website/ and reads the checked-in README,
agent guide, parser, and plot runtime files directly from this repo.
cd docs_website
npm install
npm run buildProduction docs are deployed at:
https://evim.ryangerardwilson.com
evim follows the local RGW CLI contract:
evim -hprints help.evim -vprints the installed version.evim -udelegates to the installer upgrade path.install.sh -h,install.sh -v,install.sh -v <version>,install.sh -u, andinstall.sh -b <archive.tar.gz>are supported.
After the GitHub repository is configured, release and upgrade with:
./push_release_upgrade.shThe script checks the tree, bumps the patch version from the latest remote tag,
runs tests and a production build, pushes the tag, creates a GitHub release, and
then upgrades the local install through install.sh -u.