kakoune(1)
Kakoune is a modal text editor designed around the idea of selection-first, multiple-cursor editing.
Synopsis
kakoune [OPTION]... [FILE]...Description
Kakoune is a code editor that emphasizes multiple selections and composable editing commands. Unlike vi/vim which operates on motions, Kakoune selects first then applies commands to selections, making complex edits more intuitive and predictable.
It features built-in support for multiple cursors, command highlighting, inline documentation, and language-aware syntax highlighting through plugins. Kakoune uses Ctrl for normal mode commands and provides a powerful command language for extending functionality.
Common options
| Flag | What it does |
|---|---|
-c <commands> | execute commands after loading files |
-n | do not load any resource files |
-l | list all existing sessions and exit |
-s <session> | connect to an existing session (client mode) |
-d | run as a server (daemon mode) |
-e <commands> | evaluate commands on stdin and exit |
-ui <type> | set UI type: ncurses, dummy, or json (default: ncurses) |
-p | preserve session on quit (for use with -d) |
-ro | open files in read-only mode |
Examples
open a file in Kakoune editor
kakoune myfile.txtreplace all occurrences of 'foo' with 'bar' and exit
kakoune -c '%s/foo/bar/g' file.txtstart Kakoune as a daemon server with session named 'mysession'
kakoune -d -s mysessionconnect to an existing Kakoune session as a client
kakoune -s mysessionlist all active Kakoune sessions
kakoune -lopen a file in read-only mode to prevent accidental modifications
kakoune -ro sensitive.confopen all C source files in the editor
kakoune *.cevaluate configuration commands before opening a file
echo ':set-option global tabstop 4' | kakoune -e 'file.py'