KAK(1)
β¨ NAME β¨
kak β a vim-inspired, selection oriented code editor π (this is the manual page for it, section 1, general commands manual, in case you were wondering bestie)
π¦ SYNOPSIS π¦
kak [-d] [-n] [-ro] [-c session_id | -s session_id] [-ui ui_type]
[-e command] [-E command] [+line[:column] | +:] [file ...]
kak -f keys [-q] [-i suffix] [file ...]
kak -p session_id
kak -l
kak -clear
kak -version
kak -help
okay so that's a lot of shapes to invoke one editor but every single one of them is legit, i promise, keep reading π
πΈ DESCRIPTION πΈ
Kakoune is a code editor heavily inspired by vim(1) and vi(1). As such, most of its commands are similar to vi(1)'s, sharing its βkeystrokes as a text editing languageβ model. iykyk β it's the same vibe, just with the glow-up β¨
Kakoune operates in two modes, normal and insertion. In insertion mode, keys are directly inserted into the current buffer. In normal mode, keys are used to manipulate the current selection and to enter insertion mode. that's it, that's the whole personality π
Kakoune has a strong focus on interactivity. Most commands provide immediate and incremental results, while still being competitive in keystroke count with vim. the way it shows you results *as you type*β¦ obsessed π«Ά
Kakoune works on selections, which are oriented, inclusive ranges of characters. Selections have an anchor and a cursor. Most commands move both of them except when extending selection, where the anchor character stays fixed and the cursor moves around. like, the anchor is the main character holding its ground while the cursor goes feral, fr fr π
The options are as follows:
-helpβ Display a help message and quit. π-versionβ Display Kakoune version and quit. β-nβ Do not load the system'skakrc. (often,/usr/share/kak/kakrc) not me skipping the system's whole setup π-lβ List existing sessions. π-dβ Run as a headless session (requires-s). no cap, it requires-s, don't fight it.-ecommand β Execute command after the client initialization phase.-Ecommand β Execute command after the server initialization phase. (yes there are two phases, they're different, the capitalization is doing WORK here π)-fkeys β Run Kakoune in βfilter modeβ, likesed(1). For standard input and each file named on the command line, the whole buffer is selected (as with%) then keys are executed. The filtered version of standard input is written to standard output. Any files mentioned on the command line are modified in-place, but if-iis provided then Kakoune makes a backup of the original version.
heads up bestie: in-place means in place. your files get rewritten. use -i if you want a backup, periodt.
-isuffix β Backup the files on which a filter is applied, using the given suffix. your safety net, use it π§-qβ When in βfilter modeβ, don't print any errors. silent mode activated, lowkey chaotic but go off π-psession_id β Send the commands written on the standard input to session session_id.-csession_id β Connect to the given session session_id. sliding into that session's DMs π-ssession_id β Set the current session name to session_id.-uitype β Select the user interface type, which can beterminal,dummy, orjson. three aesthetics, pick your fighter π-clearβ Remove sessions that were terminated in an incorrect state (e.g. after a crash). cleaning up the ghosts of sessions past π»-roβ Begin in readonly mode, all the buffers opened will not be written to disk. look, don't touch β no writing to disk, not ever.+line[:column] | +:β Specify a target line and column for the first file. When the plus sign is followed by only a colon, then the cursor is sent to the last line of the file. teleporting straight to where the drama is π―file ...β One or more file(s) to edit. β¨
π ENVIRONMENT π
KAKOUNE_POSIX_SHELLβ Overrides the POSIX shell used for%sh{...}expansion, which is/bin/sh(sh(1)) if unset.KAKOUNE_CONFIG_DIRβ Overrides the location of the directory containing Kakoune user configuration. If unset,$XDG_CONFIG_HOME/kakis used.KAKOUNE_RUNTIMEβ Overrides the location of the directory containing the Kakoune support files. If unset, location is determined from Kakoune's binary location.XDG_CONFIG_HOMEβ Path to the user's configuration directory. If unset,$HOME/.configis used.XDG_RUNTIME_DIRβ Path to the user's session's sockets. If unset,$TMPDIR/kakouneis used.
π FILES π
In the paths documented below, <rtdir> refers to the runtime directory, whose value is determined in relation to the path to kak's binary location if $KAKOUNE_RUNTIME is not set: <rtdir> = <path_to_kak_binary>/../share/kak.
If not started with the -n switch, kak will first load <rtdir>/kakrc, which will in turn load the following additional files:
- If the
$KAKOUNE_CONFIG_DIR/autoloaddirectory exists, recursively load every*.kakfile in it, and its sub-directories. - If it does not exist, fall back to the system-wide autoload directory in
<rtdir>/autoload, and recursively load all files in a similar way. <rtdir>/kakrc.local, if it exists; this is a user-defined system-wide configuration.$KAKOUNE_CONFIG_DIR/kakrc, if it exists; this is the user configuration.
Consequently, if the $KAKOUNE_CONFIG_DIR/autoload directory exists, only scripts stored within that directory will be loaded β the built-in *.kak files will not be. π yes, really. it's all or nothing.
Users who still want the built-in scripts to be loaded along their own can create a symbolic link to <rtdir>/autoload (or to individual scripts in it) in their user-configuration directory:
ln -s <rtdir>/autoload ${XDG_CONFIG_HOME:-$HOME/.config}/kak/autoload
symlink slay π that's the bestie move right there.
β EXAMPLES β
Edit a file:
kak /path/to/file
Edit multiple files (multiple buffers will be created):
kak ./file1.txt /path/to/file2.c
Prepend a modeline that sets the tabstop to multiple files:
kak -f "ggO// kak: tabstop=8<esc>" *.c
okay that last one is genuinely iconic β filter mode doing modeline surgery on every .c file in one go π₯
π SEE ALSO π
For the complete on-line documentation, use the :doc command after starting kak.
The Kakoune wiki: https://github.com/mawww/kakoune/wiki.
The main Kakoune web site: https://kakoune.org.
π AUTHORS π
Maxime Coste <frrrwww@gmail.com> and many others.
and that's the whole page bestie π this one came from Debian, dated June 15, 2021 β go forth and select things, you absolute legend π¦β¨
π¦ where this page comes from
- alpine 3.24: kakoune-doc 2026.05.21-r1 Β· Unlicense
- arch rolling: kakoune 2026.05.21-2 Β· custom:unlicense
- epel 9: kakoune 2025.06.03-0.el9 Β· Unlicense
- fedora 43: kakoune 2025.06.03-1.fc43 Β· Unlicense
- fedora 43: kakoune 2026.04.12-1.fc43 Β· Unlicense
- fedora 44: kakoune 2025.06.03-3.fc44 Β· Unlicense
- fedora 44: kakoune 2026.04.12-1.fc44 Β· Unlicense
- nixos 26.05: kakoune-unwrapped 2026.04.12
- nixpkgs unstable: kakoune-unwrapped 2026.05.21
- opensuse-leap 16.0: kakoune 2025.06.03-bp160.1.4 Β· Unlicense
- opensuse-leap 16.0: kakoune 2025.06.03-bp160.1.4 Β· Unlicense
- opensuse-leap 16.0: kakoune 2025.06.03-bp160.1.4 Β· Unlicense
- opensuse-leap 16.0: kakoune 2025.06.03-bp160.1.4 Β· Unlicense
- ubuntu stonking: kakoune 2026.05.21-1ubuntu1 Β· UNLICENSE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms