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

33 lines
468 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.

# ex
> 命令行文本编辑器。
> 另见:`vim`。
> 更多信息:<https://www.vim.org>。
- 打开文件:
`ex {{path/to/file}}`
- 保存并退出:
`wq<Enter>`
- 撤销最后一个操作:
`undo<Enter>`
- 在文件中搜索模式:
`/{{search_pattern}}<Enter>`
- 在整个文件中进行正则表达式替换:
`%s/{{regular_expression}}/{{replacement}}/g<Enter>`
- 插入文本:
`i<Enter>{{text}}<C-c>`
- 切换到 Vim
`visual<Enter>`