2021-09-28 20:33:50 +02:00
|
|
|
# ex
|
|
|
|
|
2025-06-28 16:12:44 +03:00
|
|
|
> Text editor.
|
2021-09-28 20:33:50 +02:00
|
|
|
> 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:
|
|
|
|
|
2025-03-09 03:23:24 +02:00
|
|
|
`i<Enter>{{text}}<Ctrl c>`
|
2021-09-28 20:33:50 +02:00
|
|
|
|
|
|
|
- Switch to Vim:
|
|
|
|
|
|
|
|
`visual<Enter>`
|