diff --git a/pages/common/kak.md b/pages/common/kak.md new file mode 100644 index 000000000..9da41b0d7 --- /dev/null +++ b/pages/common/kak.md @@ -0,0 +1,36 @@ +# kak + +> Kakoune is a mode-based code editor implementing the "multiple selections" paradigm. +> Data can be selected and simultaneously edited in different locations, using multiple selections; users can also connect to the same session for collaborative editing. + +- Open a file and enter normal mode, to execute commands: + +`kak {{path/to/file}}` + +- Enter insert mode from normal mode, to write text into the file: + +`i` + +- Escape insert mode, to go back to normal mode: + +`` + +- Replace all instances of "foo" in the current file with "bar": + +`%s{{foo}}c{{bar}}` + +- Un-select all secondary selections, and keep only the main one: + +`` + +- Search for numbers and select the first two: + +`/\d+N` + +- Insert the contents of a file: + +`!cat {{path/to/file}}` + +- Save the current file: + +`:w`