Very Little Editor

May 28, 2026 ยท View on GitHub

The Very Little Editor, or VLE, is a small text editor with just enough features to do some actual work.

Modern full-featured text editors can be a little daunting, complete with dozens upon dozens of different commands to remember and modes to switch between. It's a lot of power, but that power comes with the cognative load of having to remember which key combination to use or what mode the editor is in at any given time.

Let's try a different approach and see just how few features we need. By restricting our feature set to less than twenty powerful features, we can devote more mental effort to our projects and less mental effort to our tools.

VLE Screen Capture

Installation

Installing VLE from source can be done using Cargo:

cargo install vle

VLE compiles to a single self-contained binary which contains everything. Its syntax highlighting for different languages are built-in and it uses no configuration file; its minimal configuration options are done via simple environment variables.

Recommended Terminals and Multiplexers

Although intended to be compatible with as many different terminal emulators and multiplexers as possible, certain choices are more optimal than others.

  • Alacritty

    Somewhat spartan, but extremely fast.

  • Ghostty

    More featureful, and also quite fast.

  • Rio

    Another fine and capable choice.

  • iTerm2

    A good choice for MacOS users.

  • WezTerm

    Doesn't support Ctrl-PgUp and Ctrl-PgDn keybindings to swap buffers. Use Ctrl-] instead. Hasn't been updated in some time.

  • xterm

    Doesn't support underline colors, but fine otherwise so long as its encoding is set to UTF-8.

  • MacOS Terminal

    Doesn't support Shift-Up and Shift-Down keybindings to highlight text. Use Ctrl-Space to set the mark instead.

  • ZelliJ

    A powerful terminal multiplexer, but uses many Ctrl keybindings for its own functions. Alternatives are to use the F keybindings for our own purposes, use Ctrl-G to lock the editor's pane and make all the Ctrl keybindings available, or to update ZelliJ's configuration and rebind keys as needed.

  • tmux

    Another fine terminal multiplexer. Its default Ctrl-B keybinding overrides our binding for bookmarks, but Ins can be substituted instead or tmux's prefix key can be rebound to Ctrl-A (recommended).

  • GNU Screen

    Doesn't always fully clear the screen properly, which may result in graphical issues.

Keybindings

ActionShortcutShortcut
Toggle Keybindings DisplayF1
Open FileF2Ctrl-O
Save FileF3Ctrl-S
Goto Line or BookmarkF4Ctrl-T
Find Text in File or SelectionF5Ctrl-F
Update Selected LinesF6Ctrl-U
Goto Matching PairF7Ctrl-P
Select Inside PairF8Ctrl-E
Select Word or Whole LinesF9Ctrl-W
Handle Pane SplitsF10Ctrl-N
Reload FileF11Ctrl-L
Quit FileF12Ctrl-Q
Toggle BookmarkInsCtrl-B
Highlight TextShift-Arrows
Set MarkCtrl-Space
Start of SelectionCtrl-Home
End of SelectionCtrl-End
Indent or AutocompleteTab
CutCtrl-X
CopyCtrl-C
PasteCtrl-V
UndoCtrl-Z
RedoCtrl-Y
Switch PaneCtrl-Arrows
Previous BufferCtrl-PgUp
Next BufferCtrl-PgDn
Manage BuffersCtrl-]

Because we have so few features, non-navigational features have alternative Ctrl-based and F-based keybindings. This also helps maintain compatibility with terminal multiplexers which have many of their own dedicated Ctrl bindings.

Key Features

Persistent Vertical Centering

In an effort to improve ergonomics and to make the cursor easy to locate, it is always somewhere in the middle of the screen at all times. Like typewriters of old, content in a given pane scrolls around it as needed. This occurs not only at the end of files, but also at the beginning.

Why strain our necks looking down at a cursor or looking up at a cursor when the line we're editing can be right in the middle where it's most convenient?

Multi Cursor-Style Find and Replace

Ctrl-F / F5 to find text will highlight all matches and move your cursor to the next available match, if any. Matches can be cycled between using the up and down arrow keys. This much is unremarkable.

However, you may also edit found matches simply by typing in new text, which overwrites the located matches, or by using the left and right arrow keys to reposition cursors within all matches to make partial edits.

Multi-Item Replace Demonstration

Additionally, for regular-expression based searches, captured groups can be pasted to all matches simultaneously.

Regular Expression Replacement Demonstration

Multi Cursor-Style Line Editing

Similar to find-and-replace, you can simply highlight a selection of lines and use Ctrl-U / F6 to edit each of them simultaneously as a unit.

Multi-Line Edit Demonstration

Multi Cursor-Style Copy and Paste

When multiple items are selected, they can also be cut/copied as a unit. They can then be pasted individually, in order, or pasted as a unit to another multi-item selection.

Multi-Item Copy and Paste Demonstration

Bookmarks

Have a spot in your file you'd like to mark and return to later? Place bookmarks with Ctrl-B / Insert, which drops visible positions in the text that remain fixed in place. Ctrl-T / F4 doubles as both a way to jump to a specific line and also a means to cycle between bookmarks using the arrow keys.

Bookmarks can be removed either by Ctrl-B / Insert on the same position, or simply by erasing the text containing the bookmark. Hando for TODO items which are no longer needed.

Bookmarks

Split Pane Views

The editor's viewport can be split into vertical or horizontal panes using Ctrl-N / F10. Each pane can contain a different file, or different spots within the same file. Switch between them using Ctrl-Arrows. Ctrl-N / F10 can split panes recursively into more sub-panes, delete existing panes, or adjust the pane size ratios.

Multiple Panes Demonstration

Configuration

With very little to configure, VLE doesn't use a config file at all. Any configuration is performed with a modest number of environmental variables:

VariableDefaultMeaning
VLE_SPACES_PER_TAB4number of spaces to output per tab
VLE_ALWAYS_TAB0whether to always insert literal tabs
VLE_PAGE_SIZE25number of lines PgUp and PgDn move
VLE_EXT_MAPemptysyntax highlighting extension mapping
VLE_AUTO_SAVE0 (never)save after number of idle seconds

No config file means there's one less thing to install, learn the format of, modify or break.

Extension Mapping

Syntax highlighting is determined by a file's extension. If you have files with some non-standard extension, the VLE_EXT_MAP environmental variable can map them from one to another. Its syntax is a comma-separated list of src=target key-value pairs. For example, if one has a file.tpl that's should be highlighted as HTML, try:

VLE_EXT_MAP=tpl=html vle file.tpl

ZelliJ and tmux Integration

When Ctrl-Arrows are used to navigate panes, VLE normally stops when it cannot proceed further in any direction. When running under ZelliJ or tmux, the editor will issue a zellij or tmux command to change focus out of the VLE's pane in the given direction.

Furthermore, the Fish's keybindings can be updated to also use Ctrl-Arrows to navigate ZelliJ or tmux. Simply add the corresponding bindings to your ~/.config/fish/config.fish file:

if set -q ZELLIJ
    bind ctrl-left "zellij action move-focus left"
    bind ctrl-right "zellij action move-focus right"
    bind ctrl-up "zellij action move-focus up"
    bind ctrl-down "zellij action move-focus down"
else if set -q TMUX
    bind ctrl-left "tmux select-pane -L"
    bind ctrl-right "tmux select-pane -R"
    bind ctrl-up "tmux select-pane -U"
    bind ctrl-down "tmux select-pane -D"
end

This allows one to navigate from the editor to a nearby shell, and the reverse, for a seamless integration between the two.

Why Another Editor?

I've tried a lot of different text editors over the years, all with their own strengths and weaknesses. But I could never find the exact text editor I was looking for. Some were a little too overcomplicated. Some were a little too primitive. So rather than continue a seemingly endless search for the exact right text editor for me, I decided to write my own by mixing necessary features (like file saving) and those that impressed me in other editors (like splitting panes or selecting inside quotes).

Whether it's the editor for you depends on your needs and tastes. But VLE has been developed exclusively with itself since version 0.2, so I can confidently say that it's good enough for projects at least as large as itself.