mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-31 00:41:42 +00:00
39 lines
563 B
Plaintext
39 lines
563 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# ex
|
|
|
|
> Command-line text editor.
|
|
> See also: `vim`.
|
|
> More information: <https://www.vim.org>.
|
|
|
|
- Open a file:
|
|
|
|
`ex {{path/to/file}}`
|
|
|
|
- Save and Quit:
|
|
|
|
`wq<Enter>`
|
|
|
|
- Undo the last operation:
|
|
|
|
`undo<Enter>`
|
|
|
|
- Search for a pattern in the file:
|
|
|
|
`/{{search_pattern}}<Enter>`
|
|
|
|
- Perform a regular expression substitution in the whole file:
|
|
|
|
`%s/{{regular_expression}}/{{replacement}}/g<Enter>`
|
|
|
|
- Insert text:
|
|
|
|
`i<Enter>{{text}}<C-c>`
|
|
|
|
- Switch to Vim:
|
|
|
|
`visual<Enter>`
|