explaingit

mawww/kakoune

10,888C++Audience · developerComplexity · 3/5Setup · moderate

TLDR

A modal text editor that works with multiple simultaneous selections instead of a single cursor. Similar to Vim but redesigned around selecting and transforming text regions at once.

Mindmap

mindmap
  root((Kakoune))
    Core concept
      Selections not cursor
      Multiple selections
      Regex-based selection
    Editing modes
      Normal mode
      Insert mode
      Prompt mode
    Architecture
      Client-server
      tmux integration
      Multiple clients
    Configuration
      Hooks
      Key mappings
      Custom commands
    Platform
      Linux packages
      macOS Homebrew
      C++ source build
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Edit code in a fast keyboard-driven terminal editor that lets you change text across many locations in a single step.

USE CASE 2

Refactor code by selecting all regex matches in a buffer and replacing them simultaneously using multiple selections.

USE CASE 3

Set up a multi-pane terminal environment using tmux, with each pane connected to the same Kakoune editing session.

USE CASE 4

Pipe selected text regions through external shell scripts directly from the editor to filter or transform them.

Tech stack

C++Shell

Getting it running

Difficulty · moderate Time to first run · 30min

Available via package managers on most Linux distros and Homebrew on macOS, source build requires a C++20 compiler.

License not mentioned in the README.

In plain English

Kakoune is a modal text editor in the same family as Vim: it switches between a mode for writing text and a mode for navigating and editing. The key difference is how it thinks about editing. Where Vim builds operations around a cursor position, Kakoune builds everything around selections. Every change you make works on one or more selected ranges, and you can have many selections active at once. The multiple-selection feature is central to how Kakoune works. You can select all regex matches within a block of text, split a selection by a pattern, or discard selections that do not contain a match. This means you can apply the same change in dozens of places simultaneously without writing a macro. To rename a word across a paragraph, for example, you select the paragraph, narrow the selection to all instances of that word, and type the replacement once. Kakoune uses a client-server architecture. A server process holds the editing session and multiple clients can connect to it. You can create splits and panes in tmux or your window manager, with each pane acting as a separate client on the same session. This fits naturally into a terminal-centered workflow. Configuration uses a dedicated scripting language with support for hooks, custom commands, key remapping, and color schemes. Kakoune highlights syntax for many languages, offers contextual completion as you type, and lets you pipe selected text through any external shell program. The editor is written in C++ and runs on Linux, macOS, and Cygwin. Packages are available through most Linux distribution repositories and through Homebrew on macOS. Building from source requires a C++20 compatible compiler.

Copy-paste prompts

Prompt 1
I'm switching from Vim to Kakoune. Show me the equivalent Kakoune commands for search-and-replace, visual block selection, and recording macros.
Prompt 2
With Kakoune, how do I select all occurrences of a word in the current file and replace them using multiple selections?
Prompt 3
Write a Kakoune kakrc configuration that sets a color scheme, enables line numbers, and adds a keybinding to run the current file with a shell command.
Prompt 4
How do I connect multiple tmux panes to the same Kakoune session so each pane shows a different part of the same editing state?
Open on GitHub → Explain another repo

← mawww on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.