Skip to content

Instantly share code, notes, and snippets.

@ellm
Last active April 19, 2017 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellm/5c67d2a884161d945f4a835fb7fd55f7 to your computer and use it in GitHub Desktop.
Save ellm/5c67d2a884161d945f4a835fb7fd55f7 to your computer and use it in GitHub Desktop.
Command Cheatsheet

Vim

Command Description
Editing
d Cut/Delete
dd Cut/Delete entire line
p Paste line p (below) or P (above)
c Change (delete and then place into insert mode)
y Yank (copy) y or yy (copy entire line including carriage return)
v Enter visual mode
u Undo
Ctrl + r Redo
Navigating
hjkl h Left, j Down, k Up, l Right
0 Go to beginning of line
$ Go to end of line
gg Go to top of file
G Go to bottom of File
e Go to end of next word
w Go to beginning of next word
I A Move to beginning/end of line and insert I and A
O o Insert new line above/below current line and insert O (above) and o (below)
Motions
yiw Yank inner Word
diw Delete in Word
caw Change all Word
di[ Delete inside square brakets
di( Delete inside parens
"+p Pastes system clipboard after cursor
"+y Copy Visually selected text to system clipboard
. Repeat last motion

Links


tmux

Command Description
tmux new -s session_name creates a new tmux session named session_name
tmux attach -t session_name attaches to an existing tmux session named session_name
tmux switch -t session_name switches to an existing session named session_name
tmux list-sessions lists existing tmux sessions
tmux detach (prefix + d) detach the currently attached session

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment