Cheatography
https://cheatography.com
Notes
|
Command derived from plugin |
|
Command derived from preferences |
Global
|
Open help for a keyword |
|
Open file |
|
Save file as |
|
Close current pane |
|
Do n of command (e.g. 5dd
) |
|
Change to normal mode |
Exiting
|
Write (save) current file but don't exit |
|
Quit ALL buffers (fails if unsaved changes) |
|
Quit current buffer (fails if unsaved changes) |
|
Force quit |
|
Write (save) and quit |
Macros
|
|
|
Stop recording macro |
|
Rerun last macro |
|
|
Visual Mode
Marking Text
|
|
start visual mode |
|
start linewise visual mode |
|
Start visual block mode |
|
Mark a WORD |
|
Mark AROUND block of () |
|
Mark AROUND block with {} |
|
Mark INSIDE block with () |
|
Mark INSIDE block with {} |
Visual Commands
|
|
Shift highlighted lines right |
|
Shift highlighted lines left |
|
Yank (copy) marked text |
|
Delete marked text |
|
Switch case of marked text |
Insert Mode
|
Append to end of line |
|
Start inserting after cursor |
|
Start inserting before cursor |
Keyword Completion
|
|
Keyword completion (e.g. variable names) |
|
Keyword completion |
|
Move DOWN in autocomplete window |
|
Move UP in autocomplete window |
Normal Mode - Inserting Text
|
Insert BEFORE cursor |
|
Insert at beginning of line |
|
Insert AFTER cursor |
|
Insert at end of line |
|
Insert new line BELOW current line |
|
Insert new line ABOVE current line |
|
Insert at end of the word |
Normal Mode - Cursor Movement
|
Move cursor left |
|
Move cursor down |
|
Move cursor up |
|
Move cursor right |
|
Move cursor to TOP of screen |
|
Move cursor to MIDDLE of screen |
|
Move cursor to BOTTOM of screen |
|
Jump forward to START of word |
|
Jump forward to END of word |
|
Jump to first non-blank character of line |
|
Jump to end of the line |
|
Jump to start of the line |
|
Page Up |
|
Page Down |
|
Go to line _n_ |
|
Go to the first line of the document |
|
Go to the last line of the document |
|
Jump to next paragraph (or function/block) |
|
Jump to previous paragraph (or function/block) |
|
Scroll up without moving cursor |
|
Scroll down without moving cursor |
|
|
Normal Mode - Search & Replace
Within Buffer
|
|
Search buffer for _keyword_ |
|
Move DOWN to next instance |
|
Move UP to next instance |
|
Search buffer for word under cursor |
Within Working Directory
|
|
Search (ack) INSIDE files in working directory |
|
Open file from search (ack) in VERTICAL split |
|
Open file from search (ack) in HORIZONTAL split |
Replace
|
|
Replace all _old_ throughout file with _new_ |
|
Replace _old_ with _new_ WITH CONFIRMATIONS |
Marks/Registers
Marks
|
|
List of marks |
|
Set current position for mark a
|
|
Jump to position of mark a
|
Registers
|
|
Show registers content |
|
|
|
Paste contents of register x |
Unsure what these do... calling them out for research
Normal Mode - Editing
|
Join line below to current one |
|
change (replace) entire line |
|
change (replace) to end of word |
|
change (replace) to end of line |
|
delete character and substitute text |
|
transpose two letters |
|
undo |
|
redo |
|
Repeat last action |
|
Change INSIDE _char_ (e.g. ci"
) |
|
Change AROUND (including) _char_ (e.g. ca"
) |
Normal Mode - Code Folding
|
Close a fold |
|
Open a fold |
|
Toggle all folds |
|
Toggle single fold |
|
Close ALL folds in buffer |
Normal Mode - Buffers
|
List all buffers |
|
Close the current buffer |
|
Close _n_ buffer |
|
Navigate to next buffer |
|
Navigate to previous buffer |
|
Close the current buffer |
|
Navigate to previous buffer |
|
Navigate to next buffer |
Normal Mode - Splits
|
Split current window horizontally |
|
Split window vertically |
|
Quit a window |
Navigating Splits
|
|
Move to next split |
|
Move to split located LEFT of current |
|
Move to split located RIGHT of current |
|
Move to split located BELOW current |
|
Move to split located ABOVE current |
|
|
Normal Mode - Cut/Paste
|
Yank (copy) a line |
|
Yank (copy) a word |
|
Yank (copy) to end of line |
|
Paste BEFORE cursor |
|
Paste AFTER cursor |
|
Delete (cut) a line |
|
Delete (cut) a word |
|
Delete (cut) to end of line |
|
Delete (cut) single character |
Deleting is basically cutting; anything deleted will be on clipboard.
Ctrl-P
|
Start Ctrl-P to search for files |
|
Open file in new buffer |
|
Navigate UP in file list |
|
Navigate DOWN in file list |
|
Move FORWARD in search locations (files, buffers, most recent files) |
|
Move BACKWARD in search locations |
Ack.vim
|
Open highlighted file in VERTICAL split |
|
Open highlighted file in HORIZONTAL split |
|
Open highlighted file in new buffer |
|
Open ack.vim for searching |
|
Close search results window |
NerdTree
|
Toggle NerdTree |
|
Move to ROOT of working directory |
|
Move to parent folder above cursor |
NerdComment
|
Toggle comment |
|
Line comment |
|
Uncomment |
Buffergator
|
Close the current buffer |
|
Navigate to previous buffer |
|
Navigate to next buffer |
Vimdiff - Layout
Access vimdiff for a branch with git mergetool
from bash
VimDiff - Commands
|
Use local version |
|
Use base version |
|
Use remote version |
|
Navigate to PREVIOUS conflict |
|
Navigate to NEXT conflict |
It is possible to edit the code in the merged pane directly if none of the options (local, base, remote) are preferable.
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by brennanmeadowcroft