1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/kak.md

38 lines
873 B
Markdown
Raw Normal View History

2018-02-21 09:26:40 +03:00
# 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.
2019-06-05 08:55:45 +01:00
> More information: <https://kakoune.org>.
2018-02-21 09:26:40 +03:00
- 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>`
2018-02-21 09:26:40 +03:00
- Escape insert mode, to go back to normal mode:
`<Esc>`
2018-02-21 09:26:40 +03:00
- Replace all instances of "foo" in the current file with "bar":
`%s{{foo}}<Enter>c{{bar}}<Esc>`
2018-02-21 09:26:40 +03:00
- Unselect all secondary selections, and keep only the main one:
2018-02-21 09:26:40 +03:00
`<Space>`
- Search for numbers and select the first two:
`/\d+<Enter>N`
- Insert the contents of a file:
`<!>cat {{path/to/file}}<Enter>`
2018-02-21 09:26:40 +03:00
- Save the current file:
`<:>w<Enter>`