---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# ex
> Text editor.
> See also: `vim`.
> More information: .
- Open a file:
`ex {{path/to/file}}`
- Save and Quit:
`wq`
- Undo the last operation:
`undo`
- Search for a pattern in the file:
`/{{search_pattern}}`
- Perform a `regex` substitution in the whole file:
`%s/{{regex}}/{{replacement}}/g`
- Insert text:
`i{{text}}`
- Switch to Vim:
`visual`