Skip to content
foursmithPublic

About

A VSCode-like terminal workbench with Vim-like keybindings. Browse code, review diffs, and make quick edits.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

░▒▒▒▒░       ▒▒▒▒▒   ▒▒▒▒▒
░▒▓▓▓▓      ▓▓▓▓▓▓   ▒▓▓▓▓
░░▒▓▓▓▓    ▒▓▓▓▓▓▓   ▒▓▓▓▓
░░░▒▓▓▓▒  ░▓▓▓▓▓▓░   ▒▓▓▓▓
 ░░░▒▓▓▓░░▓▓▓▓▓▓░    ▓▓▓▓▓
  ░░░▓▓▓▓▓▓▓▓▓▓▒     ▓▓▓▓▓░░░░░░░░░
   ░░░▓▓▓▓▓▓▓▓▒      ▓▓▓▓▓▓▓▓▓▓▓▓▓▒
    ░░▒▒▒▒▒▒▓▒       ▒▒▒▒▒▒▒▒▒▒▒▒▒▒
     ░▒▒▒▒▒▒▓        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒

A VSCode-like terminal workbench with Vim-like keybindings. Browse code, review diffs, and make quick edits.

Agents write all my code now. I still review their diffs before they commit. VS Code with the Vim extension has been my go-to for years, so I built vl around the bits I actually use. One ~10 MB binary, ready to run.

  • Omitted VS Code features
    • Language server integration
      • Code completion
      • Diagnostics
      • Go to Definition
    • Debugging
    • Integrated terminal
    • Build and test tasks
    • Extension runtime and marketplace
  • Omitted Vim features
    • Visual block mode
    • Macros
    • Named registers
    • Marks and mark jumps
    • Ex commands
    • Vimscript configuration and plugins

Install

Homebrew

brew tap foursmith/tap
brew install foursmith/tap/vl

Go

Requires Go 1.27.3 or newer.

go install github.com/foursmith/vl/cmd/vl@latest

Add Go's bin directory to your PATH if needed.

macOS and Linux

curl -fsSL https://github.com/foursmith/vl/releases/latest/download/install.sh | sh

Installs to ~/.local/bin. Add that directory to your PATH if needed.

Windows (PowerShell)

Invoke-RestMethod -UseBasicParsing https://github.com/foursmith/vl/releases/latest/download/install.ps1 | Invoke-Expression

Installs to %LOCALAPPDATA%\vl\bin and adds it to your user PATH.

Build from source

Build from source with Go 1.27.3 or newer.

git clone https://github.com/foursmith/vl.git
cd vl
make build

Run ./bin/vl from the checkout or copy it into a directory on your PATH.

Usage

Setup

  • Workbench mode requires Git on your PATH. Git
  • For GitHub pull requests, install gh and run gh auth login. GitHub CLI
  • For remote images in Markdown, install curl.
  • For SVG previews, install resvg and put it on your PATH. resvg
  • For file icons, install a Nerd Font and select it in your terminal's font settings. Nerd Fonts

Modes

  • Workbench mode. Run vl . to browse files, search the workspace, and review Git changes.
  • Editor mode. Run vl path/to/file to open a single file in the Vim-like editor.
  • Preview mode. Run vl preview path/to/file to print syntax-highlighted code in your terminal.

Click the language in the bottom-right status bar or choose Change Syntax Highlighting from the command palette to set a file's syntax. The choice is saved per file and applies to vl preview as well. Choose Auto Detect to detect syntax from the filename or a recognized shebang, such as #!/bin/sh, #!/usr/bin/env node, or #!/usr/bin/env python3. Choose Plain Text to disable syntax highlighting for that file.

See Keyboard shortcuts for the workbench and Where vl differs from Vim for editor keys.

Yazi integration

Make sure vl is on your PATH.

Preview code

Requires Yazi 26.9.1 or newer. Install the preview plugin.

ya pkg add foursmith/vl:vl-preview

Enable code previews in yazi.toml.

[[plugin.prepend_previewers]]
mime = "text/*"
run = "vl-preview"

[[plugin.prepend_previewers]]
mime = "application/{mbox,javascript,wine-extension-ini}"
run = "vl-preview"

Open text files

Add this to yazi.toml to open text files in vl with Enter or o.

[[opener.vl]]
run = "vl -- %s1"
block = true
desc = "Edit in vl"

[[open.prepend_rules]]
mime = "text/*"
use = ["vl", "reveal"]

[[open.prepend_rules]]
mime = "application/{json,ndjson,mbox,javascript,wine-extension-ini}"
use = ["vl", "reveal"]

Development

make build  # updates bin/vl
make test
make check  # go vet + race-enabled tests

Acknowledgments

  • Thanks to TTT for textmate-go and for inspiring vl’s implementation.
  • Thanks to VS Code, which vl’s entire interface is modeled after.
  • Thanks to Vim, which vl’s keybindings are modeled after.

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

See LICENSE for the full text. Third-party components retain their respective licenses; see Third-party notices.

About

A VSCode-like terminal workbench with Vim-like keybindings. Browse code, review diffs, and make quick edits.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages