- PDF Link: cheatsheet-vim-A4.pdf, Category: tools
- Blog URL: https://cheatsheet.dennyzhang.com/cheatsheet-vim-A4
- Related posts: Shell CheatSheet, #denny-cheatsheets
File me Issues or star this repo.
| Name | Summary |
|---|---|
| Show help | :help |
| Enter to paste mode | :set paste |
| Put vim to background/foreground | C-z; fg |
| Password protecting file | vim +X filename |
| Install enhanced vim | yum install vim-enhance |
| Name | Summary |
|---|---|
| Page down/up | C-d / C-b; C-u / C-f |
| Forward/backward character | l, h |
| Prevous/next line | k, Ctrl-p; j, Ctrl-n |
| Move to next word | w/W |
| Go to the top | gg |
| Go to the bottom | G |
| Go to beginning of the line | B |
| Go to end of the line | 0 |
| Name | Summary |
|---|---|
| Delete current word | d-w |
| Delete current line | d-d |
| Delete to the bottom | d-G |
| Name | Summary |
|---|---|
| Undo the previous changes | In view mode, u |
| Reload file from disk | :e |
| Name | Summary |
|---|---|
| Next panel | C-h |
| Split panel | :split |
| Vertical split panel | :vsplit |
| Change panel size | C-w >, C-w < |
| Name | Summary |
|---|---|
| Copy block | shift+v, y |
| Paste block | shift+v, p |
| Cut block | shift+v, x |
| comment/uncomment block | shift+v, gc |
| Name | Summary |
|---|---|
| Show current filename | :echo @% |
| Open a new file | :edit <filename> |
Image credit to http://michael.peopleofhonoronly.com/vim/
License: Code is licensed under MIT License.