# mawww/kakoune

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/mawww-kakoune).**

10,938 stars · 772 forks · C++ · Unlicense

## Links

- GitHub: https://github.com/mawww/kakoune
- Homepage: http://kakoune.org
- awesome-repositories: https://awesome-repositories.com/repository/mawww-kakoune.md

## Description

Kakoune is a scriptable, modal text editor for the terminal that employs a client-server architecture. This model allows multiple terminal windows to connect to a single editing session, providing a programmable environment for managing source code and text.

The editor is distinguished by its selection-first logic, where a text region must be predefined before a command is applied. It leverages regular expressions to manage multiple cursors and perform bulk edits across complex text patterns, and it integrates deeply with the shell by piping selections through external programs and filters.

The system includes a unified command language for both interactive use and automation, supported by event hooks, macro recording, and a hierarchical configuration system. It further provides regex-based syntax highlighting, a flexible key mapping system with custom modal namespaces, and various buffer management primitives including atomic writing and asynchronous output handling.

## Tags

### Development Tools & Productivity

- [Modal Editing Systems](https://awesome-repositories.com/f/development-tools-productivity/modal-editing-systems.md) — Implements a selection-first modal editing system for precise text and code manipulation.
- [Modal Editors](https://awesome-repositories.com/f/development-tools-productivity/modal-editors.md) — The editor manipulates text and code through a selection-based modal interface. ([source](https://github.com/mawww/kakoune/tree/master/libexec/kak))
- [Command Line Interfaces](https://awesome-repositories.com/f/development-tools-productivity/command-line-interfaces.md) — Provides a command line to enter and validate text instructions or search queries. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/modes.asciidoc))
- [Command Piping](https://awesome-repositories.com/f/development-tools-productivity/command-piping.md) — Pipes selected text through shell programs to transform content or insert command output. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Custom Key Mappings](https://awesome-repositories.com/f/development-tools-productivity/custom-key-mappings.md) — Provides a flexible system for registering user-defined keyboard shortcuts to trigger editor actions. ([source](https://github.com/mawww/kakoune/blob/master/README.asciidoc))
- [Modal Keymap States](https://awesome-repositories.com/f/development-tools-productivity/custom-key-mappings/modal-keymap-states.md) — Implements custom modal states that redefine how keys are interpreted based on the active interaction mode. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Editor Buffer Managers](https://awesome-repositories.com/f/development-tools-productivity/editor-buffer-managers.md) — Provides comprehensive management of editor buffers, including lifecycle control for read-only and scratch buffers. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Modal Input Systems](https://awesome-repositories.com/f/development-tools-productivity/modal-input-systems.md) — Isolates keyboard interpretations into distinct namespaces based on the active interaction mode.
- [Multi-Cursor Editing](https://awesome-repositories.com/f/development-tools-productivity/multi-cursor-editing.md) — The editor handles several active edit points simultaneously to apply changes across selections. ([source](https://github.com/mawww/kakoune/blob/master/VIMTOKAK))
- [Multi-Cursor Editing Systems](https://awesome-repositories.com/f/development-tools-productivity/multi-cursor-editing-systems.md) — The editor moves cursors and performs edits like yanking and pasting across active selections. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Selection-Based Command Execution](https://awesome-repositories.com/f/development-tools-productivity/selection-based-command-execution.md) — The editor modifies text and source code using a selection-based command-line interface. ([source](https://github.com/mawww/kakoune/blob/master/Makefile))
- [Shell Command Execution](https://awesome-repositories.com/f/development-tools-productivity/shell-command-execution.md) — Integrates deeply with the shell by executing external commands and piping their output directly into the editor. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/expansions.asciidoc))
- [Shell Integration Tools](https://awesome-repositories.com/f/development-tools-productivity/shell-integration-tools.md) — Deeply integrates with the shell by piping text selections through external programs and filters.
- [Unified Command Interfaces](https://awesome-repositories.com/f/development-tools-productivity/terminal-automation/interaction-scripting/unified-command-interfaces.md) — Provides a unified language for both interactive prompts and automation scripts to execute internal operations.
- [Terminal Text Editors](https://awesome-repositories.com/f/development-tools-productivity/terminal-text-editors.md) — A programmable terminal-based code editor featuring regex-based selections and multiple cursors.
- [Client-Server Architectures](https://awesome-repositories.com/f/development-tools-productivity/terminal-text-editors/client-server-architectures.md) — Employs a client-server architecture allowing multiple terminal windows to connect to a single editing session.
- [Filesystem Loading](https://awesome-repositories.com/f/development-tools-productivity/text-buffer-manipulations/buffer-based-storage/filesystem-loading.md) — Allows loading text directly from the host filesystem into the editor's buffers or registers. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/expansions.asciidoc))
- [Text Editing Modes](https://awesome-repositories.com/f/development-tools-productivity/text-editing-modes.md) — The editor inserts characters at the cursor and provides basic manipulation and completion. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Scriptable Automation](https://awesome-repositories.com/f/development-tools-productivity/text-editors/scriptable-automation.md) — Provides a programmable environment for automating text manipulation through command strings and event hooks.
- [Text Object Selection](https://awesome-repositories.com/f/development-tools-productivity/text-object-selection.md) — The editor selects logical units of text like paragraphs and blocks for efficient editing. ([source](https://github.com/mawww/kakoune/blob/master/README.asciidoc))
- [Unified Command Languages](https://awesome-repositories.com/f/development-tools-productivity/unified-command-languages.md) — Employs a consistent command language for both interactive user input and programmable automation scripts. ([source](https://github.com/mawww/kakoune/blob/master/doc/design.asciidoc))
- [Asynchronous Buffer Population](https://awesome-repositories.com/f/development-tools-productivity/asynchronous-buffer-population.md) — The editor uses FIFO buffers to run background commands and display results progressively. ([source](https://github.com/mawww/kakoune#readme))
- [Custom Command Definitions](https://awesome-repositories.com/f/development-tools-productivity/cli-command-frameworks/custom-command-definitions.md) — Allows users to define new editor commands to extend the programmable environment. ([source](https://github.com/mawww/kakoune#readme))
- [Command Palette Executions](https://awesome-repositories.com/f/development-tools-productivity/code-editors-ides/command-palette-executions.md) — Provides a keyboard-driven command interface for executing internal editor instructions with history and completion. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Command Aliasing](https://awesome-repositories.com/f/development-tools-productivity/command-aliasing.md) — Supports creating short nicknames for existing commands to accelerate interactive text editing. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Command Completion Systems](https://awesome-repositories.com/f/development-tools-productivity/command-completion-systems.md) — Provides configurable completion logic for command parameters using buffers, files, or shell scripts. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Multiline Command Sequences](https://awesome-repositories.com/f/development-tools-productivity/command-options/snippet-search/multiline-command-sequences.md) — Runs a sequence of commands or simulated keypresses as a single unit of work. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Runtime State Injection](https://awesome-repositories.com/f/development-tools-productivity/data-injection/runtime-state-injection.md) — Replaces placeholders with real-time values from the editor's internal state during command execution. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/expansions.asciidoc))
- [Command Scripting](https://awesome-repositories.com/f/development-tools-productivity/debuggers/command-scripting.md) — Evaluates a set of commands as if they were entered interactively into the prompt. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/execeval.asciidoc))
- [Document Marks](https://awesome-repositories.com/f/development-tools-productivity/documentation-navigation/document-structure-navigators/document-marks.md) — The editor records selections as spans with timestamps to return to specific document locations. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/registers.asciidoc))
- [Editor State APIs](https://awesome-repositories.com/f/development-tools-productivity/editor-state-apis.md) — Provides read-only access to internal metadata like cursor position and buffer names for use in scripts. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/expansions.asciidoc))
- [Event Hooks](https://awesome-repositories.com/f/development-tools-productivity/event-hooks.md) — Triggers specific commands automatically when predefined editor events occur. ([source](https://github.com/mawww/kakoune#readme))
- [File Navigation Tools](https://awesome-repositories.com/f/development-tools-productivity/file-navigation-tools.md) — Allows rapid navigation to specific locations within a file or jumping to referenced files. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/modes.asciidoc))
- [In-Editor Text Completion](https://awesome-repositories.com/f/development-tools-productivity/in-editor-text-completion.md) — Implements real-time text suggestions based on configurable search paths and completion engines. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/options.asciidoc))
- [Key Sequence Patterns](https://awesome-repositories.com/f/development-tools-productivity/input-binding-libraries/multi-key-bindings/leader-key-sequences/key-sequence-patterns.md) — Supports binding specific sequences of keys to commands across different operational scopes. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Sequence-Based Mappings](https://awesome-repositories.com/f/development-tools-productivity/input-binding-libraries/multi-key-bindings/leader-key-sequences/sequence-based-mappings.md) — Allows keys to trigger other complex sequences or commands across different interaction modes. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/mapping.asciidoc))
- [Macro Recorders](https://awesome-repositories.com/f/development-tools-productivity/macro-recorders.md) — Captures a sequence of commands into a register to automate repetitive tasks. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Workflow Customization](https://awesome-repositories.com/f/development-tools-productivity/modal-editors/workflow-customization.md) — Enables highly personalized editing environments through scripted event hooks and custom modal namespaces.
- [Selection History Traversal](https://awesome-repositories.com/f/development-tools-productivity/package-managers/dependency/workspace-managers/history-navigators/selection-history-traversal.md) — Enables navigation through a history of previous selection positions and jumps to specific lines. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Named Pipe Streaming](https://awesome-repositories.com/f/development-tools-productivity/stream-piping-utilities/named-pipe-streaming.md) — Reads content from a named pipe into a buffer and updates the view as new data arrives. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/buffers.asciidoc))
- [Text Register Managers](https://awesome-repositories.com/f/development-tools-productivity/text-register-managers.md) — The editor stores named lists of text for later retrieval from yanked content. ([source](https://github.com/mawww/kakoune#readme))
- [Selection History Persistence](https://awesome-repositories.com/f/development-tools-productivity/text-selection-utilities/selection-history-persistence.md) — The editor saves text lists and selection locations into named registers for later use. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/registers.asciidoc))

### Software Engineering & Architecture

- [Client-Server Text Editor Architectures](https://awesome-repositories.com/f/software-engineering-architecture/client-server-text-editor-architectures.md) — Employs a client-server architecture allowing multiple terminal windows to connect to a single editing session.
- [Client-Server Architecture](https://awesome-repositories.com/f/software-engineering-architecture/client-server-architecture.md) — The editor connects multiple terminal windows to a single editing session using a client-server architecture. ([source](https://github.com/mawww/kakoune/blob/master/README.asciidoc))
- [Selection Manipulation Engines](https://awesome-repositories.com/f/software-engineering-architecture/syntax-parsing-engines/regex-based-parsers/selection-manipulation-engines.md) — Employs regular expressions to split, filter, and multiply cursor positions for simultaneous editing.
- [Scope-Selector Configurations](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/state-management-architectures/scope-and-hierarchy-management/hierarchical-scopes/scope-selector-configurations.md) — Maintains configuration values at global, window, and buffer levels for granular control.
- [Configuration Scope Hierarchies](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/state-management-architectures/scope-and-hierarchy-management/hierarchical-scopes/scope-selector-configurations/configuration-scope-hierarchies.md) — Provides a hierarchical configuration system with values scoped at global, window, and buffer levels. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/options.asciidoc))

### Part of an Awesome List

- [Regex-Based Bulk Editing](https://awesome-repositories.com/f/awesome-lists/devtools/regex-based-bulk-editing.md) — Leverages regular expressions to manage multiple cursors and execute bulk edits across complex text patterns.
- [Structural Text Transformations](https://awesome-repositories.com/f/awesome-lists/devtools/structural-text-transformations.md) — The editor executes structural changes like alignment and case conversion across active selections. ([source](https://github.com/mawww/kakoune/blob/master/README.asciidoc))
- [Text Editors](https://awesome-repositories.com/f/awesome-lists/devtools/text-editors.md) — Modal editor with a focus on selection.

### Data & Databases

- [Text Search and Replace](https://awesome-repositories.com/f/data-databases/text-pattern-matching/text-search-and-replace.md) — The editor identifies all occurrences of a pattern across a buffer and replaces them. ([source](https://github.com/mawww/kakoune/blob/master/VIMTOKAK))
- [External Feed Integrations](https://awesome-repositories.com/f/data-databases/external-data-integrations/external-feed-integrations.md) — Uses named pipes to stream data asynchronously between the editor and external shell processes.
- [Capture Group Implementation](https://awesome-repositories.com/f/data-databases/text-pattern-matching/capture-group-implementation.md) — The editor stores grouped sub-matches from a search into indexed registers. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/registers.asciidoc))

### Security & Cryptography

- [Output Externalization](https://awesome-repositories.com/f/security-cryptography/request-size-limiters/output-size-constraints/output-externalization.md) — Sends selection content to an external shell filter and replaces it with the resulting output. ([source](https://github.com/mawww/kakoune#readme))

### User Interface & Experience

- [Terminal Input Modes](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/input-handling/modifier-key-listeners/mode-modifiers/terminal-input-modes.md) — Manages isolated mapping namespaces to organize commands and prevent conflicts with built-in keys. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/modes.asciidoc))
- [Selection Logic](https://awesome-repositories.com/f/user-interface-experience/selection-logic.md) — Ensures all operations require a predefined text selection before a command is applied.
- [Multiple](https://awesome-repositories.com/f/user-interface-experience/selection-management/multiple.md) — The editor creates and filters multiple selections based on regex patterns or shell results. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Regex-Based Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/regex-based-highlighting.md) — The editor uses regular expressions to apply visual styles to specific text patterns. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/highlighters.asciidoc))
- [Text Selection Control](https://awesome-repositories.com/f/user-interface-experience/text-selection-control.md) — The editor selects a region of text before applying an operation to ensure consistency. ([source](https://github.com/mawww/kakoune/blob/master/VIMTOKAK))
- [Regex-Based Selection](https://awesome-repositories.com/f/user-interface-experience/text-selection-control/regex-based-selection.md) — The editor finds occurrences of text via regex to create or jump between selections. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Editor Gutter Components](https://awesome-repositories.com/f/user-interface-experience/editor-gutter-components.md) — The editor adds flags or symbols in the buffer margin to show warnings or metadata. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/highlighters.asciidoc))
- [Line Numbering Utilities](https://awesome-repositories.com/f/user-interface-experience/line-numbering-utilities.md) — The editor renders line numbers in the gutter with relative numbering and highlighting options. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/highlighters.asciidoc))
- [Modal Display Controllers](https://awesome-repositories.com/f/user-interface-experience/modal-components/modal-display-controllers.md) — The editor shows modal or anchored messages and documentation to the user. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Highlighter Management](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/highlighter-management.md) — The editor adds or removes syntax or pattern highlighters within the current window. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))
- [Range-Based Styling](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/range-based-styling.md) — The editor applies visual styles or replaces text ranges based on coordinate specifications. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/highlighters.asciidoc))
- [Region-Based Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/region-based-highlighting.md) — The editor segments text into regions using delimiters to apply styles to nested blocks. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/highlighters.asciidoc))
- [Syntax Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighting.md) — Applies visual styles by matching text patterns against a prioritized set of regular expressions.
- [Navigation Patterns](https://awesome-repositories.com/f/user-interface-experience/text-selection-control/regex-based-selection/navigation-patterns.md) — The editor moves the cursor or extends selections using character or pattern-based movements. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Selection Filtering](https://awesome-repositories.com/f/user-interface-experience/text-selection-control/regex-based-selection/selection-filtering.md) — The editor reduces a set of selections to those matching a specific regular expression. ([source](https://github.com/mawww/kakoune/blob/master/VIMTOKAK))
- [Selection State Persistence](https://awesome-repositories.com/f/user-interface-experience/text-selection-control/selection-state-persistence.md) — The editor stores current selection positions in registers to restore or merge them later. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc))
- [Visual Style Customization](https://awesome-repositories.com/f/user-interface-experience/visual-style-customization.md) — The editor defines color faces and loads colorschemes to control the visual styling. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/commands.asciidoc))

### Artificial Intelligence & ML

- [Terminal Element Styling](https://awesome-repositories.com/f/artificial-intelligence-ml/text-generation-controls/acoustic-style-controls/terminal-element-styling.md) — The editor defines foreground colors, background colors, and text attributes to control the visual appearance of components. ([source](https://github.com/mawww/kakoune/blob/master/doc/pages/faces.asciidoc))

### Operating Systems & Systems Programming

- [Terminal Development Environments](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/terminal-development-environments.md) — Provides a complete terminal-based development environment using a client-server architecture for multiple windows.

### Programming Languages & Runtimes

- [Configuration Scripting](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/dynamic-scripting-languages/lua/configuration-runtimes/configuration-scripting.md) — Provides a scripting environment for dynamically configuring editor behavior and settings at startup. ([source](https://github.com/mawww/kakoune#readme))
