$linuxjunkies
>

kakoune(1)

Kakoune is a modal text editor designed around the idea of selection-first, multiple-cursor editing.

UbuntuDebianFedoraArch

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

FlagWhat it does
-c <commands>execute commands after loading files
-ndo not load any resource files
-llist all existing sessions and exit
-s <session>connect to an existing session (client mode)
-drun as a server (daemon mode)
-e <commands>evaluate commands on stdin and exit
-ui <type>set UI type: ncurses, dummy, or json (default: ncurses)
-ppreserve session on quit (for use with -d)
-roopen files in read-only mode

Examples

open a file in Kakoune editor

kakoune myfile.txt

replace all occurrences of 'foo' with 'bar' and exit

kakoune -c '%s/foo/bar/g' file.txt

start Kakoune as a daemon server with session named 'mysession'

kakoune -d -s mysession

connect to an existing Kakoune session as a client

kakoune -s mysession

list all active Kakoune sessions

kakoune -l

open a file in read-only mode to prevent accidental modifications

kakoune -ro sensitive.conf

open all C source files in the editor

kakoune *.c

evaluate configuration commands before opening a file

echo ':set-option global tabstop 4' | kakoune -e 'file.py'

Related commands