mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00

* Updates vim and vimtutor pages * Easy peasy. * Use <Enter> instead of <Cr> * Show help command. We might not be able to help you move around but the interactive help provided by vim is pretty good, so helping people find it might be a good idea. * Reorder commands and lowercase help
31 lines
489 B
Markdown
31 lines
489 B
Markdown
# vim
|
|
|
|
> Vi IMproved, a programmer's text editor.
|
|
|
|
- Open a file with cursor at the given line number:
|
|
|
|
`vim {{file}} +{{linenumber}}`
|
|
|
|
- Open multiple files at once, each file in its own tab page:
|
|
|
|
`vim -p {{file1}} {{file2}} {{file3}}`
|
|
|
|
- Open a file in read-only mode:
|
|
|
|
`view {{file}}`
|
|
|
|
- Enter normal text editing mode (insert mode):
|
|
|
|
`<Esc> i`
|
|
|
|
- Search in file:
|
|
|
|
`/{{search_string}}<Enter>`
|
|
|
|
- Save and Exit vim:
|
|
|
|
`<Esc> :wq <Enter>`
|
|
|
|
- Open interactive help:
|
|
|
|
`<Esc> :help <Enter>`
|