Files
tldr/pages.zh/common/kak.md

37 lines
810 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# kak
> Kakoune 是一个基于模式的代码编辑器,实施“多重选择”范式。
> 数据可以在不同位置同时被选择和编辑,使用多重选择;用户也可以连接到同一会话进行协作编辑。
> 更多信息:<https://kakoune.org>。
- 打开一个文件并进入普通模式,以执行命令:
`kak {{path/to/file}}`
- 从普通模式进入插入模式,以在文件中写入文本:
`i`
- 退出插入模式,返回普通模式:
`<Esc>`
- 将当前文件中所有“foo”的实例替换为“bar”
`%s{{foo}}<Enter>c{{bar}}<Esc>`
- 取消选择所有次要选择,仅保留主要选择:
`<Space>`
- 搜索数字并选择前两个:
`/\d+<Enter>N`
- 插入文件的内容:
`!cat {{path/to/file}}<Enter>`
- 保存当前文件:
`:w<Enter>`