{"id":15015360,"url":"https://github.com/bluedream0911/kakoune","last_synced_at":"2026-02-14T13:33:38.304Z","repository":{"id":256676792,"uuid":"856214412","full_name":"BlueDream0911/kakoune","owner":"BlueDream0911","description":"mawww's experiment for a better code editor","archived":false,"fork":false,"pushed_at":"2024-09-15T00:24:28.000Z","size":16636,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T00:18:12.647Z","etag":null,"topics":["cpp","kakounescript","perl","python","shell"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlueDream0911.png","metadata":{"files":{"readme":"README.asciidoc","changelog":"CHANGELOG","contributing":"CONTRIBUTING","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-12T07:31:10.000Z","updated_at":"2024-09-15T00:24:31.000Z","dependencies_parsed_at":"2024-09-15T06:16:31.077Z","dependency_job_id":"21b8c571-bb5b-4f17-a8c0-bb0359ac0e8f","html_url":"https://github.com/BlueDream0911/kakoune","commit_stats":null,"previous_names":["david-duke0911/kakoune","bluedream0911/kakoune"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlueDream0911/kakoune","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueDream0911%2Fkakoune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueDream0911%2Fkakoune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueDream0911%2Fkakoune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueDream0911%2Fkakoune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueDream0911","download_url":"https://codeload.github.com/BlueDream0911/kakoune/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueDream0911%2Fkakoune/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278338501,"owners_count":25970743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","kakounescript","perl","python","shell"],"created_at":"2024-09-24T19:47:01.698Z","updated_at":"2025-10-04T16:21:31.355Z","avatar_url":"https://github.com/BlueDream0911.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"= image:{logo}[K,30,30,link=\"{website}\",title=\"Kakoune logo by p0nce\"] Kakoune image:{cirrus-img}[link=\"{cirrus-url}\"] image:{srht-img}[link=\"{srht-url}\"] image:{irc-img}[link=\"{irc-url}\"]\nifdef::env-github,env-browser[:outfilesuffix: .asciidoc]\n:logo: https://rawgit.com/mawww/kakoune/master/doc/kakoune_logo.svg\n:website: https://kakoune.org\n:cirrus-img: https://api.cirrus-ci.com/github/mawww/kakoune.svg\n:cirrus-url: https://cirrus-ci.com/github/mawww/kakoune\n:srht-img: https://builds.sr.ht/~mawww/kakoune.svg\n:srht-url: https://builds.sr.ht/~mawww/kakoune?\n:irc-img: https://img.shields.io/badge/IRC-%23kakoune-blue.svg\n:irc-url: https://web.libera.chat/?channels=kakoune\n:icons: font\n:toc: right\n:pp: ++\n\nTL;DR\n-----\n\n{website}\n\n*Modal editor* -- *Faster as in fewer keystrokes* --\n*Multiple selections* -- *Orthogonal design*\n\n---------------------------------------------\ngit clone https://github.com/mawww/kakoune.git\ncd kakoune\nmake\n./src/kak\n---------------------------------------------\n\nSee https://github.com/mawww/golf for Kakoune solutions to vimgolf challenges,\nregularly beating the best Vim solution.\n\nSee the link:doc/design.asciidoc[design document] for more information on\nKakoune's philosophy and design.\n\nIntroduction\n------------\n\nKakoune is a code editor that implements Vi's \"keystrokes as a text editing\nlanguage\" model. As it is also a modal editor, it is somewhat similar to the\nVim editor (after which Kakoune was originally inspired).\n\nKakoune can operate in two modes: *normal* and *insertion*. In insertion mode,\nkeys are directly inserted into the current buffer. In normal mode, keys\nare used to manipulate the current selection and to enter insertion mode.\n\nKakoune has a strong focus on interactivity. Most commands provide immediate\nand incremental results, while being competitive with Vim in terms of keystroke count.\n\nKakoune works on selections, which are oriented, inclusive ranges of characters.\nSelections have an anchor and a cursor. Most commands move both of\nthem except when extending selections, where the anchor character stays fixed\nand the cursor moves around.\n\nSee https://vimeo.com/82711574\n\nJoin us on libera IRC `#Kakoune`\n\nFeatures\n~~~~~~~~\n\n * Multiple selections as a central way of interacting\n * Powerful selection manipulation primitives\n   - Select all regex matches in current selections\n   - Keep selections containing/not containing a match for a given regex\n   - Split current selections with a regex\n   - Text objects (paragraph, sentence, nestable blocks)\n * Powerful text manipulation primitives\n   - Align selections\n   - Rotate selection contents\n   - Case manipulation\n   - Indentation\n   - Piping each selection to external filter\n * Client-Server architecture\n   - Multiple clients on the same editing session\n   - Use tmux or your X11 window manager to manage windows\n * Simple interaction with external programs\n * Automatic contextual help\n * Automatic as you type completion\n * Macros\n * Hooks\n * Syntax Highlighting\n   - Supports multiple languages in the same buffer\n   - Highlight a buffer differently in different windows\n\nScreenshots\n~~~~~~~~~~~\n\n[[screenshot-i3]]\n.Kakoune in i3\nimage::doc/screenshot-i3.gif[Kakoune in i3]\n\n[[screenshot-tmux]]\n.Kakoune in tmux\nimage::doc/screenshot-tmux.gif[Kakoune in tmux]\n\nGetting started\n---------------\n\nBuilding\n~~~~~~~~\n\nKakoune's dependencies are:\n\n * A {cpp}20 compliant compiler (GCC \u003e= 10.3 or clang \u003e= 11) along with its\n   associated {cpp} standard library (libstdc{pp} \u003e= 10 or libc{pp})\n\nTo build, just type *make* in the src directory.\nTo generate man pages, type *make man* in the src directory.\n\nKakoune can be built on Linux, MacOS, and Cygwin. Due to Kakoune relying heavily\non being in a Unix-like environment, no native Windows version is planned.\n\nInstalling\n~~~~~~~~~~\n\nIn order to install *kak* on your system, rather than running it directly from\nits source directory, type *make install*. You can specify the `PREFIX` and\n`DESTDIR` if needed.\n\n[TIP]\n.Homebrew (macOS) or Linuxbrew\n====\n---------------------------------\nbrew install kakoune\n---------------------------------\n====\n\n[TIP]\n.MacPorts (macOS)\n====\n---------------------------------\nsudo port selfupdate\nsudo port install kakoune\n---------------------------------\n====\n\n[TIP]\n.Fedora supported versions and Rawhide\n====\n---------------------------------\ndnf install kakoune\n---------------------------------\n====\n\n[TIP]\n.Fedora daily builds\n====\nUse the https://copr.fedoraproject.org/coprs/jkonecny/kakoune/[copr] repository.\n---------------------------------\ndnf copr enable jkonecny/kakoune\ndnf install kakoune\n---------------------------------\n====\n\n[TIP]\n.RHEL/CentOS 8\n====\nKakoune can be found in the https://src.fedoraproject.org/rpms/kakoune/tree/epel8[EPEL8 repositories].\n---------------------------------\ndnf install kakoune\n---------------------------------\n====\n\n[TIP]\n.Arch Linux\n====\nKakoune is found in the https://www.archlinux.org/packages/community/x86_64/kakoune/[repositories].\n--------------------------------------------------\npacman -S kakoune\n--------------------------------------------------\n====\n\n[TIP]\n.Gentoo\n====\nKakoune is found in portage as\nhttps://packages.gentoo.org/packages/app-editors/kakoune[app-editors/kakoune].\n--------------------------------\nemerge kakoune\n--------------------------------\nhttps://wiki.gentoo.org/wiki/Kakoune[Installation and Gentoo specific documentation] is available.\n====\n\n[TIP]\n.Exherbo\n====\n--------------------------------\ncave resolve -x repository/mawww\ncave resolve -x kakoune\n--------------------------------\n====\n\n[TIP]\n.openSUSE\n====\nKakoune can be found in the https://software.opensuse.org/package/kakoune[repositories].\n\n---------------------------\nsudo zypper install kakoune\n---------------------------\n====\n\n[TIP]\n.Ubuntu\n====\nKakoune can be found in the Ubuntu repositories.\n\n----------------------------\nsudo apt install kakoune\n----------------------------\n\nIf you want to compile from source on 20.04 or earlier, you must force the build to use GCC 10, which is not the default. Also, make sure you have .local/bin in your path so that kak is available after the installation.\n\n----------------------------------------------------------------\ngit clone https://github.com/mawww/kakoune.git \u0026\u0026 cd kakoune/src\nCXX=g++-10 make\nmake PREFIX=$HOME/.local install\n----------------------------------------------------------------\n====\n\n[TIP]\n.Debian\n====\nKakoune can be found in Debian 9 (Stretch) and later releases.\n\n---------------------------\nsudo apt install kakoune\n---------------------------\n====\n\n[TIP]\n.FreeBSD\n====\nKakoune is available in the official ports tree as\nhttps://www.freshports.org/editors/kakoune[editors/kakoune].\n\nA binary package is also available and can be installed with\n--------------------------------------------------\npkg install kakoune\n--------------------------------------------------\n====\n\n[TIP]\n.OpenBSD\n====\nBuilding on OpenBSD 6.7 amd64.\n\n--------------------------------------------------\n# pkg_add git gmake\n# git clone https://github.com/mawww/kakoune\n# cd kakoune\n# export CXX=clang++\n# gmake install\n--------------------------------------------------\n\nKakoune is available in the 6.7-current port tree as \nhttp://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/editors/kakoune/[editors/kakoune]\n\nA binary package is also available for -current snapshot and can be installed with\n--------------------------------------------------\n# pkg_add kakoune\n--------------------------------------------------\n\nRunning with support for plugins.\n--------------------------------------------------\n# pkg_add dash\n$ export KAKOUNE_POSIX_SHELL=/usr/local/bin/dash \n$ kak\n--------------------------------------------------\n====\n\n[TIP]\n.Solus\n====\nKakoune is available in the Solus stable repository.\n\nIt can be installed with\n---------------------\neopkg install kakoune\n---------------------\n====\n\n[TIP]\n.Void\n====\nKakoune is available in the repositories.\n\nIt can be installed with\n-----------------------\nxbps-install -S kakoune\n-----------------------\n====\n\n[TIP]\n.Termux\n====\nKakoune is available in the repositories.\n\nIt can be installed with\n-------------------\npkg install kakoune\n-------------------\n====\n\n[TIP]\n.Nix\n====\n--------------------------------\nnix-env -iA nixpkgs.kakoune\n--------------------------------\n====\n\nRunning\n~~~~~~~\n\nRunning *kak* launches a new kak session with a client on local terminal.\nRun *kak -help* to discover the valid command line flags.\n\nConfiguration\n^^^^^^^^^^^^^\n\nThere are two directories containing Kakoune's scripts:\n\n* `runtime`: located in `../share/kak/` relative to the `kak` binary\n  contains the system scripts, installed with Kakoune.\n* `userconf`: located in `$XDG_CONFIG_HOME/kak/`, which will fallback\n  to `$HOME/.config/kak/` if `$XDG_CONFIG_HOME` is not set, containing\n  the user configuration.\n\nUnless `-n` is specified, Kakoune will load its startup script located\nat `${runtime}/kakrc` relative to the `kak` binary. This startup script\nis responsible for loading the user configuration.\n\nFirst, Kakoune will search recursively for `.kak` files in the `autoload`\ndirectory. It will first look for an `autoload` directory at\n`${userconf}/autoload` and will fallback to `${runtime}/autoload` if\nit does not exist.\n\nOnce all those files are loaded, Kakoune will try to source\n`${runtime}/kakrc.local`, which is expected to contain distribution provided\nconfiguration.\n\nFinally, the user configuration will load from `${userconf}/kakrc`.\n\nNOTE: If you create a user `autoload` directory in `${userconf}/autoload`,\nthe system one at `${runtime}/autoload` will not load anymore. You can\nadd a symbolic link to it (or to individual scripts) inside\n`${userconf}/autoload` to keep loading system scripts.\n\nBasic Interaction\n-----------------\n\nSelections\n~~~~~~~~~~\n\nThe main concept in Kakoune is the selection. A selection is an inclusive,\ndirected range of characters. A selection has two ends, the anchor and the\ncursor.\n\nThere is always at least one selection, and a selection is always at least\none character (in which case the anchor and cursor of the selection are\non the same character).\n\nNormal Mode\n~~~~~~~~~~~\n\nIn normal mode, keys are not inserted directly inside the buffer, but are editing\ncommands. These commands provide ways to manipulate either the selections themselves\nor the selected text.\n\nInsert Mode\n~~~~~~~~~~~\n\nWhen entering insert mode, keys are now directly inserted before each\nselection's cursor. Some additional keys are recognised in insert mode:\n\n * `\u003cesc\u003e`: leave insert mode\n * `\u003cbackspace\u003e`: delete characters before cursors\n * `\u003cdel\u003e`: delete characters under cursors\n * `\u003cleft\u003e, \u003cright\u003e, \u003cup\u003e, \u003cdown\u003e`: move cursors in given direction\n * `\u003chome\u003e`: move cursors to line beginning\n * `\u003cend\u003e`: move cursors to line ending\n\n * `\u003cc-n\u003e`: select next completion candidate\n * `\u003cc-p\u003e`: select previous completion candidate\n * `\u003cc-x\u003e`: explicit insert completion query, followed by:\n   - `f`: explicit file completion\n   - `w`: explicit word completion\n   - `l`: explicit line completion\n * `\u003cc-o\u003e`: disable automatic completion for this insert session\n\n * `\u003cc-r\u003e`: insert contents of the register given by next key\n * `\u003cc-v\u003e`: insert next keystroke directly into the buffer,\n    without interpreting it\n\n * `\u003cc-u\u003e`: commit changes up to now as a single undo group\n\n * `\u003ca-;\u003e`: escape to normal mode for a single command\n\nMovement\n~~~~~~~~\n\nSee \u003c\u003cAppending\u003e\u003e below for instructions on extending (appending to) the current selection in order to select more text.\n\n * `h`: select the character on the left of selection end\n * `j`: select the character below the selection end\n * `k`: select the character above the selection end\n * `l`: select the character on the right of selection end\n\n * `w`: select the word and following whitespaces on the right of selection end\n * `b`: select preceding whitespaces and the word on the left of selection end\n * `e`: select preceding whitespaces and the word on the right of selection end\n * `\u003ca-[wbe]\u003e`: same as [wbe], but select WORD instead of word\n\n * `f`: select to (including) the next occurrence of the given character\n * `t`: select until (excluding) the next occurrence of the given character\n * `\u003ca-[ft]\u003e`: same as [ft] but in the other direction\n\n * `m`: select to matching character\n * `M`: extend selection to matching character\n\n * `x`: expand selections to contain full lines (including end-of-lines)\n * `\u003ca-x\u003e`: trim selections to only contain full lines (not including last\n            end-of-line)\n\n * `%`: select whole buffer\n\n * `\u003ca-h\u003e`: select to line begin\n * `\u003ca-l\u003e`: select to line end\n\n * `/`: search (select next match)\n * `\u003ca-/\u003e`: search (select previous match)\n * `?`: search (extend to next match)\n * `\u003ca-?\u003e`: search (extend to previous match)\n * `n`: select next match\n * `N`: add a new selection with next match\n * `\u003ca-n\u003e`: select previous match\n * `\u003ca-N\u003e`: add a new selection with previous match\n\n * `pageup, \u003cc-b\u003e`: scroll one page up\n * `pagedown, \u003cc-f\u003e`: scroll one page down\n * `\u003cc-u\u003e`: scroll half a page up\n * `\u003cc-d\u003e`: scroll half a page down\n\n * `)`: rotate selections (the main selection becomes the next one)\n * `(`: rotate selections backwards\n\n * `;`: reduce selections to their cursor\n * `\u003ca-;\u003e`: flip the selections' direction\n * `\u003ca-:\u003e`: ensure selections are in forward direction (cursor after anchor)\n\n * `\u003ca-.\u003e`: repeat last object or `f`/`t` selection command.\n\n * `_`: trim selections\n\nA word is a sequence of alphanumeric characters or underscore, a WORD is a\nsequence of non whitespace characters.\n\nAppending\n~~~~~~~~~\n\nFor most \u003c\u003cMovement\u003e\u003e commands, using `Shift` extends the current selection\ninstead of replacing it.\n\nExamples:\n\n * `wWW` selects 3 consecutive words: first `w` selects a word, then `WW` extends the selection two words further.\n * `f/F/` selects up to and including the second `/` character forward.\n\nUsing Counts\n~~~~~~~~~~~~\n\nMost selection commands also support counts, which are entered before the\ncommand itself.\n\nFor example, `3W` selects 3 consecutive words and `3w` select the third word on\nthe right of selection end.\n\nDisabling Hooks\n~~~~~~~~~~~~~~~\n\nAny normal mode command can be prefixed with `\\` which will disable hook execution\nfor the duration for the command (including the duration of modes the command could\nmove to, so `\\i` will disable hooks for the whole insert session).\n\nAs autoindentation is implemented in terms of hooks, this can be used to disable\nit when pasting text.\n\nChanges\n~~~~~~~\n\n * `i`: enter insert mode before each selection\n * `a`: enter insert mode after each selection\n * `d`: yank and delete each selection\n * `c`: yank and delete each selection and enter insert mode\n * `.`: repeat last insert mode change (`i`, `a`, or `c`, including\n        the inserted text)\n\n * `\u003ca-d\u003e`: delete each selection\n * `\u003ca-c\u003e`: delete each selection and enter insert mode\n\n * `I`: enter insert mode at each selection begin line start\n * `A`: enter insert mode at each selection end line end\n * `o`: enter insert mode in one (or given count) new lines below\n        each selection end\n * `O`: enter insert mode in one (or given count)  new lines above\n        each selection begin\n\n * `\u003ca-o\u003e`: add an empty line below each cursor\n * `\u003ca-O\u003e`: add an empty line above each cursor\n\n * `y`: yank selections\n * `p`: paste after each selection end\n * `P`: paste before each selection begin\n * `\u003ca-p\u003e`: paste all after each selection end\n * `\u003ca-P\u003e`: paste all before each selection begin\n * `R`: replace each selection with yanked text\n * `\u003ca-R\u003e`: replace each selection with every yanked text\n\n * `r`: replace each character with the next entered one\n\n * `\u003ca-j\u003e`: join selected lines\n * `\u003ca-J\u003e`: join selected lines and select spaces inserted\n            in place of line breaks\n * `\u003ca-_\u003e`: merge contiguous selections together (works across lines as well)\n\n * `\u003cgt\u003e (\u003e)`: indent selected lines\n * `\u003ca-gt\u003e`: indent selected lines, including empty lines\n * `\u003clt\u003e (\u003c)`: deindent selected lines\n * `\u003ca-lt\u003e`: deindent selected lines, do not remove incomplete\n        indent (3 leading spaces when indent is 4)\n\n * `|`: pipe each selection through the given external filter program\n        and replace the selection with its output.\n * `\u003ca-|\u003e`: pipe each selection through the given external filter program\n        and ignore its output\n\n * `!`: insert command output before each selection\n * `\u003ca-!\u003e`: append command output after each selection\n\n * `u`: undo last change\n * `\u003cc-k\u003e`: move backward in history\n * `\u003ca-u\u003e`: undo selection changes\n * `U`: redo last change\n * `\u003cc-j\u003e`: move forward in history\n * `\u003ca-U\u003e`: redo selection changes\n\n * `\u0026`: align selections, align the cursor of selections by inserting\n        spaces before the first character of the selection\n * `\u003ca-\u0026\u003e`: copy indent, copy the indentation of the main selection\n        (or the count one if a count is given) to all other ones\n\n * ```: to lower case\n * `~`: to upper case\n * ``\u003ca-`\u003e``: swap case\n\n * `@`: convert selected tabs to spaces, uses the buffer tabstop option or\n        the count parameter for tabstop.\n * `\u003ca-@\u003e`: convert selected spaces to tabs, uses the buffer tabstop option\n            or the count parameter for tabstop.\n\n * `\u003ca-)\u003e`: rotate selections content, if specified, the count groups\n            selections, so `3\u003ca-)\u003e` rotate (1, 2, 3) and (4, 5, 6)\n            independently.\n * `\u003ca-(\u003e`: rotate selections content backwards\n\nGoto Commands\n~~~~~~~~~~~~~\n\nCommands beginning with `g` are used to goto certain position and or buffer.\nIf a count is given prior to hitting `g`, `g` will jump to the given line.\nUsing `G` will extend the selection rather than jump.\n\nSee \u003c\u003cdoc/pages/keys#goto-commands,`:doc keys goto-commands`\u003e\u003e.\n\nView commands\n~~~~~~~~~~~~~\n\nCommands beginning with `v` permit to center or scroll the current\nview. Using `V` will lock view mode until `\u003cesc\u003e` is hit\n\nSee \u003c\u003cdoc/pages/keys#view-commands,`:doc keys view-commands`\u003e\u003e.\n\nMarks\n~~~~~\n\nCurrent selections position can be saved in a register and restored later on.\n\nSee \u003c\u003cdoc/pages/keys#marks,`:doc keys marks`\u003e\u003e.\n\nJump list\n~~~~~~~~~\n\nSome commands, like the goto commands, buffer switch or search commands,\npush the previous selections to the client's jump list.\n\nSee \u003c\u003cdoc/pages/keys#jump-list,`:doc keys jump-list`\u003e\u003e.\n\nMulti Selection\n~~~~~~~~~~~~~~~\n\nKak was designed from the start to handle multiple selections.\nOne way to get a multiselection is via the `s` key.\n\nFor example, to change all occurrences of word 'roger' to word 'marcel'\nin a paragraph, here is what can be done:\n\n * select the paragraph with `x` then enough `J`\n * press `s` and enter roger, then enter\n * now paragraph selection was replaced with multiselection of each roger in\nthe paragraph\n * press `c` and marcel\u003cesc\u003e to replace rogers with marcels\n\nA multiselection can also be obtained with `S`, which splits the current\nselection according to the regex entered. To split a comma separated list,\nuse `S` then ', *'\n\nThe regex syntax supported by Kakoune is the based on the ECMAScript script\nsyntax and is described at \u003c\u003cdoc/pages/regex#,`:doc regex`\u003e\u003e.\n\n`s` and `S` share the search pattern with `/`, and hence entering an empty\npattern uses the last one.\n\nAs a convenience, `\u003ca-s\u003e` allows you to split the current selections on\nline boundaries.\n\nTo clear multiple selections, use `,`. To keep only the nth selection\nuse `n` followed by `,`, in order to remove a selection, use `\u003ca-,\u003e`.\n\n`\u003ca-k\u003e` allows you to enter a regex and keep only the selections that\ncontains a match for this regex. Using `\u003ca-K\u003e` you can keep the selections\nnot containing a match.\n\n`C` duplicates selections on the lines that follow them, column-wise.\n`\u003ca-C\u003e` does the same but on the preceding lines.\n\n`$` allows you to enter a shell command and pipe each selection to it.\nSelections whose shell command returns 0 will be kept, other will be dropped.\n\nObject Selection\n~~~~~~~~~~~~~~~~\n\nObjects are specific portions of text, like sentences, paragraphs, numbers…\nKakoune offers many keys allowing you to select various text objects.\n\nSee \u003c\u003cdoc/pages/keys#object-selection,`:doc keys object-selection`\u003e\u003e.\n\nCommands\n--------\n\nWhen pressing `:` in normal mode, Kakoune will open a prompt to enter a command.\n\nCommands are used for non editing tasks, such as opening a buffer, writing the\ncurrent one, quitting, etc.\n\nSee \u003c\u003cdoc/pages/keys#prompt-commands,`:doc keys prompt-commands`\u003e\u003e.\n\nBasic Commands\n~~~~~~~~~~~~~~\n\nSome commands take an exclamation mark (`!`), which can be used to force\nthe execution of the command (i.e. to quit a modified buffer, the\ncommand `q!` has to be used).\n\nCommands starting with horizontal whitespace (e.g. a space) will not be\nsaved in the command history.\n\n * `cd [\u003cdirectory\u003e]`: change the current directory to `\u003cdirectory\u003e`, or the home directory if unspecified\n * `doc \u003ctopic\u003e`: display documentation about a topic. The completion list\n     displays the available topics.\n * `e[dit][!] \u003cfilename\u003e [\u003cline\u003e [\u003ccolumn\u003e]]`: open buffer on file, go to given\n     line and column. If file is already opened, just switch to this file.\n     Use edit! to force reloading.\n * `w[rite][!] [\u003cfilename\u003e]`: write buffer to \u003cfilename\u003e or use its name if\n     filename is not given. If the file is write-protected, its\n     permissions are temporarily changed to allow saving the buffer and\n     restored afterwards when the write! command is used.\n * `w[rite]a[ll]`: write all buffers that are associated to a file.\n * `q[uit][!] [\u003cexit status\u003e]`: exit Kakoune, use quit! to force quitting even\n     if there is some unsaved buffers remaining. If specified, the client exit\n     status will be set to \u003cexit status\u003e.\n * `w[a]q[!] [\u003cexit status\u003e]`: write the current buffer (or all buffers when\n     `waq` is used) and quit. If specified, the client exit status will be set\n     to \u003cexit status\u003e.\n * `kill[!]`: terminate the current session, all the clients as well as the server,\n     use kill! to ignore unsaved buffers\n * `b[uffer] \u003cname\u003e`: switch to buffer \u003cname\u003e\n * `b[uffer]n[ext]`: switch to the next buffer\n * `b[uffer]p[rev]`: switch to the previous buffer\n * `d[el]b[uf][!] [\u003cname\u003e]`: delete the buffer \u003cname\u003e\n * `source \u003cfilename\u003e`: execute commands in \u003cfilename\u003e\n * `colorscheme \u003cname\u003e`: load named colorscheme.\n * `rename-client \u003cname\u003e`: set current client name\n * `rename-buffer \u003cname\u003e`: set current buffer name\n * `rename-session \u003cname\u003e`: set current session name\n * `echo [options] \u003ctext\u003e`: show \u003ctext\u003e in status line, with the following options:\n   ** `-markup`: expand the markup strings in \u003ctext\u003e\n   ** `-debug`: print the given text to the `\\*debug*` buffer\n * `nop`: does nothing, but as with every other commands, arguments may be\n     evaluated. So nop can be used for example to execute a shell command\n     while being sure that its output will not be interpreted by kak.\n     `:%sh{ echo echo tchou }` will echo tchou in Kakoune, whereas\n     `:nop %sh{ echo echo tchou }` will not, but both will execute the\n     shell command.\n * `fail \u003ctext\u003e`: raise an error, uses \u003ctext\u003e as its description\n\nMultiple commands\n~~~~~~~~~~~~~~~~~\n\nMultiple commands can be separated either by new lines or by semicolons,\nas such a semicolon must be escaped with `\\;` to be considered as a literal\nsemicolon argument.\n\nString syntax and expansions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nValues, options and shell context can be interpolated in strings.\n\nSee \u003c\u003cdoc/pages/expansions#,`:doc expansions`\u003e\u003e.\n\nConfiguration \u0026 Autoloading\n---------------------------\n\nKakrc\n~~~~~\n\nIf not launched with the `-n` switch, Kakoune will source the\n`../share/kak/kakrc` file relative to the `kak` binary, which\nwill source additional files:\n\nIf the `$XDG_CONFIG_HOME/kak/autoload` directory exists, load every\n`*.kak` files in it, and load recursively any subdirectory.\n\nIf it does not exist, falls back to the site wide autoload directory\nin `../share/kak/autoload/`.\n\nAfter that, if it exists, source the `$XDG_CONFIG_HOME/kak/kakrc` file\nwhich should be used for user configuration.\n\nIn order to continue autoloading site-wide files with a local autoload\ndirectory, just add a symbolic link to `../share/kak/autoload/` into\nyour local autoload directory.\n\nColor Schemes\n~~~~~~~~~~~~~\n\nKakoune ships with some color schemes that are installed to\n`../share/kak/colors/`. If `$XDG_CONFIG_HOME/kak/colors/` is present\nthe builtin command `colorscheme` will offer completion for those\ncolor schemes. If a scheme is duplicated in userspace, it will take\nprecedence.\n\nOptions\n-------\n\nKakoune can store named and typed values that can be used both to\ncustomize the core editor behaviour, and to keep data used by extension\nscripts.\n\nSee \u003c\u003cdoc/pages/options#,`:doc options`\u003e\u003e.\n\n\nAdvanced topics\n---------------\n\nFaces\n~~~~~\n\nFaces describe how characters are displayed on the screen: color, bold, italic...\n\nSee \u003c\u003cdoc/pages/faces#,`:doc faces`\u003e\u003e.\n\nRegisters\n~~~~~~~~~\n\nRegisters are named lists of text. They are used for various purposes,\nlike storing the last yanked text, or the captured groups associated with the selections.\n\nSee \u003c\u003cdoc/pages/registers#,`:doc registers`\u003e\u003e.\n\nMacros\n~~~~~~\n\nKakoune can record and replay a sequence of key presses.\n\nSee \u003c\u003cdoc/pages/keys#macros,`:doc keys macros`\u003e\u003e.\n\nSearch selection\n~~~~~~~~~~~~~~~~\n\nUsing the `*` key, you can set the search pattern to the current selection.\nSee \u003c\u003cdoc/pages/keys#searching,`:doc keys searching`\u003e\u003e.\n\nRegex syntax\n~~~~~~~~~~~~\n\nKakoune regex syntax is based on the ECMAScript syntax (ECMA-262 standard).\nIt always runs on Unicode codepoint sequences, not on bytes.\n\nSee \u003c\u003cdoc/pages/regex#,`:doc regex`\u003e\u003e.\n\nExec and Eval\n~~~~~~~~~~~~~\n\nThe `execute-keys` and `evaluate-commands` are useful for scripting\nin non interactive contexts.\n\nSee \u003c\u003cdoc/pages/execeval#,`:doc execeval`\u003e\u003e.\n\nInsert mode completion\n~~~~~~~~~~~~~~~~~~~~~~\n\nKakoune can propose completions while inserting text: filenames, words, lines…\n\nSee \u003c\u003cdoc/pages/keys#insert-mode-completion,`:doc keys insert-mode-completion`\u003e\u003e.\n\nEscape to normal mode\n~~~~~~~~~~~~~~~~~~~~~\n\nFrom insert mode, pressing `\u003ca-;\u003e` allows you to execute a single normal mode\ncommand. This provides a few advantages:\n\n * The selections are not modified: when leaving insert mode using `\u003cesc\u003e` the\n   selections can change, for example when insert mode was entered with `a` the\n   cursor will go back one char. Or if on an end of line the cursor will go back\n   left (if possible).\n\n * The modes are nested: that means the normal mode can enter prompt (with `:`),\n   or any other modes (using `:on-key` or `:menu` for example), and these modes\n   will get back to the insert mode afterwards.\n\nThis feature is tailored for scripting/macros, as it provides a more predictable\nbehaviour than leaving insert mode with `\u003cesc\u003e`, executing normal mode command\nand entering back insert mode (with which binding ?)\n\nSee \u003c\u003cdoc/pages/modes#,`:doc modes`\u003e\u003e.\n\nHighlighters\n~~~~~~~~~~~~\n\nManipulation of the displayed text, such as syntax coloration and wrapping\nis done through highlighters.\n\nSee \u003c\u003cdoc/pages/highlighters#,`:doc highlighters`\u003e\u003e.\n\nHooks\n~~~~~\n\nCommands can be registered to be executed when certain events arise with hooks.\n\nSee \u003c\u003cdoc/pages/hooks#,`:doc hooks`\u003e\u003e.\n\nKey Mapping\n~~~~~~~~~~~\n\nCustom key shortcuts can be registered through mappings.\n\nSee \u003c\u003cdoc/pages/mapping#,`:doc mapping`\u003e\u003e.\n\nDefining Commands and Aliases\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nNew commands can be created using `:define-command`.\n\nSee \u003c\u003cdoc/pages/commands#declaring-new-commands,`:doc commands declaring-new-commands`\u003e\u003e.\n\nThey can be given additional short names depending of the scope with `:alias`.\n\nSee \u003c\u003cdoc/pages/commands#aliases,`:doc commands aliases`\u003e\u003e.\n\nSome helper commands are available to define composite commands.\n\nSee \u003c\u003cdoc/pages/commands#helpers,`:doc commands helpers`\u003e\u003e.\n\nFIFO Buffers\n~~~~~~~~~~~\n\nFIFO buffers are very useful for running some commands asynchronously while\nprogressively displaying their result in Kakoune.\n\nSee \u003c\u003cdoc/pages/buffers#fifo-buffers,`:doc buffers fifo-buffers`\u003e\u003e.\n\nCredits\n-------\n\nThanks to https://github.com/p0nce[p0nce] for designing the\nhttps://github.com/mawww/kakoune/blob/master/doc/kakoune_logo.svg[Kakoune\nlogo].\n\nAnd thanks to all the\nhttps://github.com/mawww/kakoune/graphs/contributors[contributors] who help\nmove the project forward!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedream0911%2Fkakoune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluedream0911%2Fkakoune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedream0911%2Fkakoune/lists"}