tldr/pages/common/ex.md

34 lines
470 B
Markdown
Raw Permalink Normal View History

2021-09-28 19:33:50 +01:00
# 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>`