mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-20 18:35:24 +02:00
create vim.md
initial
This commit is contained in:
parent
6cd9bbb8cb
commit
59cd3f3fec
1 changed files with 37 additions and 0 deletions
37
pages.pl/common/vim.md
Normal file
37
pages.pl/common/vim.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# vim
|
||||
|
||||
> Vim (Vi IMproved), a command-line text editor, provides several modes for different kinds of text manipulation.
|
||||
> Pressing `i` enters edit mode. `<Esc>` goes back to normal mode, which doesn't allow regular text insertion.
|
||||
> More information: <https://www.vim.org>.
|
||||
|
||||
- Open a file:
|
||||
|
||||
`vim {{path/to/file}}`
|
||||
|
||||
- View Vim's help manual:
|
||||
|
||||
`:help<Enter>`
|
||||
|
||||
- Save a file:
|
||||
|
||||
`:write<Enter>`
|
||||
|
||||
- Quit without saving:
|
||||
|
||||
`:quit!<Enter>`
|
||||
|
||||
- Open a file at a specified line number:
|
||||
|
||||
`vim +{{line_number}} {{path/to/file}}`
|
||||
|
||||
- Undo the last operation:
|
||||
|
||||
`u`
|
||||
|
||||
- Search for a pattern in the file (press `n`/`N` to go to next/previous match):
|
||||
|
||||
`/{{search_pattern}}<Enter>`
|
||||
|
||||
- Perform a regex substitution in the whole file:
|
||||
|
||||
`:%s/{{pattern}}/{{replacement}}/g<Enter>`
|
Loading…
Add table
Reference in a new issue