# Vis: a vi-like editor built on Plan 9 structural regular expressions

> Vis keeps vi's modal editing but replaces ex commands with sam's structural regular expressions, and it deliberately refuses to be bug-for-bug compatible with vim. Here is what that buys you, what it costs, and how to build it.

**martanne/vis** — A vi-like editor based on Plan 9's structural regular expressions

- Repository: https://github.com/martanne/vis
- Stars: 4,859 · Forks: 286
- Language: C
- License: NOASSERTION
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/martanne-vis

## What Vis solves that vi and vim do not

Vi's editing model is a set of motions and operators applied to a cursor. Vim grew that model with windows, tabs, a scripting language, file browsing and an ex command line. Vis takes the opposite route. It keeps modal editing, then bolts on the command language from sam, Rob Pike's editor from the Plan 9 world, where regular expressions operate on structures in the text rather than on single lines.

The README states the intent plainly: Vis aims to combine the strengths of both vi(m) and sam, and "the intention is not to be bug-for-bug compatible with vi(m)." That sentence is the whole project in miniature. If your muscle memory depends on a specific vim behaviour that exists for historical reasons, Vis will not reproduce it.

The audience is narrow and identifiable. You are comfortable in a terminal, you edit text rather than manage projects, and you have at some point wanted to apply a change to every function body matching a pattern without writing a script. Vis also targets resource-constrained environments: the core is C99, and the README describes it as legacy-free C that should run where a heavier editor will not.

## Structural regular expressions and multiple selections as one mechanism

The mechanism is easier to understand if you stop thinking of a selection as a cursor position. In Vis, a selection is a range of text, and you can hold several of them at once. A structural regular expression command produces a new set of selections from the current ones, and then an operator applies to all of them.

That is the sam inheritance. In sam, a command like a global substitution is expressed as a pipeline: select the region, narrow it with a regex, then act. Vis exposes the same idea through its command language, and the repository layout reflects it. sam.c and sam.h sit next to text-regex.c and text-regex-tre.c, so the regex engine and the sam command loop are separate components. The optional TRE dependency exists to make regex search more memory efficient, per the README.

Multiple selections are not a separate feature bolted onto the regex engine; they are the substrate the command language writes into. The buffer, view and text layers are split across buffer.c, view.c and text.c, with text-iterator.c and text-motions.c handling traversal. Syntax highlighting is a separate concern: it uses Parsing Expression Grammars expressed in Lua with LPeg, which is why Lua and LPeg are optional runtime dependencies rather than part of the editor core.

## Building Vis from source and a first structural edit

The README gives the build steps directly. You need a C99 compiler, a POSIX.1-2008 environment, curses (recommended), and optionally Lua >= 5.2, LPeg >= 0.12 for syntax highlighting, and TRE for more memory efficient regex search. The three-line build is:

```bash
./configure && make && sudo make install
```

The configure script auto-detects Lua support through pkg-config(1). Run `./configure --help` to see the supported options, or edit the generated config.mk afterwards. If you would rather not compile anything, the README points to distribution-provided packages on the project wiki.

There is also a Docker path. The repository's Dockerfile builds inside i386/alpine:3.24 and installs the build dependencies, and its first line says to run `make docker` to produce a statically linked vis executable.

```bash
make docker
```

Once installed, the entry point is the vis(1) manual page, which the README links as the end user documentation, alongside the project wiki and its FAQ. The wiki also carries pages on the differences from sam(1) and from vim(1). Read those before judging the editor, because the differences are the design, not accidents. There is a Lua API for in-process extensions, documented separately from the C API, and the lua/ directory in the repository holds the shipped Lua code.

## The non goals are the real limitation

Most editor reviews bury the constraints. Vis lists them. The README's Non Goals section states that tabs, multiple workspaces and advanced window management will not be implemented. Neither will a file and directory browser, archive support for tar and zip, network protocols such as ftp, http and ssh, encryption, compression, or any GUI.

The list continues: no VimL, no right-to-left text, no ex mode (the README's justification is that structural regexp is more elegant), no diff mode, no vimgrep, no internal spell checker, and no pile of compile-time configurable features behind #ifdef.

The practical consequence is that Vis is the wrong tool for a workflow built on any of those. If you open a project directory in your editor, browse to a file, split the window, and run a project-wide grep, Vis does not do that, and the README says it will not. The project's stated answer is composition: clipboard and digraph handling and a fuzzy file open dialog are provided by independent utilities, and there are plans for a client/server architecture that delegates window management to your windowing system or terminal multiplexer. That is a coherent philosophy, but it means the editor you install is a smaller piece of your setup than vim is, and the rest is yours to assemble.

## Vis compared with Neovim and with sam itself

The obvious comparison is Neovim, and the difference is not speed or plugins. Neovim keeps vim's ex command line, its window model and its scripting ecosystem, and extends them. Vis removes the ex command line and replaces it with sam's command language, then declines to implement windows, tabs and a file browser. If you want a vim that is maintained and scriptable, Neovim is the direct answer, and Vis is not competing for that job.

The more interesting comparison is sam. Sam is the origin of the structural regular expression idea, and the Vis wiki maintains a page on the differences from sam(1). Sam is a mouse-driven editor from a graphical environment; Vis is a terminal editor with vi's modal keybindings layered on top of the same command model. So Vis is roughly sam's editing semantics with vi's input model, which is exactly what the README's opening sentence claims.

A third reference point sits in the repository itself: the README notes that Vis strives to be simple and focuses on efficient text management. That is a statement about scope, and it is the axis on which all three editors differ. Neovim expands scope, sam assumes a graphical workstation, and Vis contracts scope to the buffer and the command language.

## Maintenance, releases and what the licence file says

The repository is not archived, and the last push to master was on 2026-08-20. The most recent tagged release is v0.9, published on 2024-05-01, following v0.8 on 2022-11-01 and v0.7 on 2020-12-08. The release cadence is slow and irregular, so the gap between a release and the branch is worth checking before you decide which to build.

Upgrade cost is low in one sense and non-trivial in another. The build is a single configure and make, and the dependency list is short, but Lua, LPeg and TRE are optional and change what the binary can do. A distribution package may be compiled without them, so a binary that works on one machine may lack syntax highlighting on another. If those features matter, build from source and check the configure output.

The LICENSE file is at the top level of the repository, and the project metadata reports the licence as NOASSERTION, meaning no standard licence identifier was detected. That is a packaging signal rather than a legal one: read LICENSE yourself before redistributing a build or shipping a modified binary, and if the terms matter to your organisation, have someone qualified read it rather than relying on the metadata.

## Conclusion

Adopt Vis if you already think in vi motions but want sam's structural regular expressions and multiple selections in the same buffer, and if you are willing to build or install a C99 program whose optional features depend on Lua, LPeg and TRE. Do not adopt it if you need tabs, a file browser, diff mode, vimgrep, VimL, or an ex command line; the README lists all of those as non goals, not as missing features waiting to land. Before committing, verify three things on your own machine: that ./configure detects Lua and LPeg the way you expect, that your terminal renders the curses interface correctly, and that the structural regexp syntax in the vis(1) manual page covers the edits you actually perform. The last push to master was on 2026-08-20 and the most recent tagged release is v0.9 from 2024-05-01, so pin a release or a commit rather than tracking the branch.

## FAQ

### How do I install the Vis editor?

Build it from source with ./configure && make && sudo make install, which the README gives as the standard path, or install one of the distribution-provided packages linked from the project wiki. The Dockerfile supports a statically linked build via make docker.

### What is the difference between Vis and vim?

Vis keeps vi's modal editing but replaces ex commands with sam's structural regular expressions, and the README states the intention is not to be bug-for-bug compatible with vi(m). The project wiki keeps a dedicated page on the differences from vim(1).

### Does Vis support Lua plugins?

Yes. Lua is an optional dependency, and the README describes a Lua API for in-process extensions alongside the C API. Syntax highlighting uses Parsing Expression Grammars written in Lua with LPeg.

## Sources

- [Issues](https://github.com/martanne/vis/issues)
- [martanne/vis on GitHub](https://github.com/martanne/vis)
- [README](https://github.com/martanne/vis/blob/master/README.md)
- [Releases](https://github.com/martanne/vis/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/martanne-vis
