My personal vim cheatsheet

Here is my vim & tmux cheatsheet.

This is my .tmux.conf. I prefer to set the meta key to q.

1set-option -g prefix C-q
2set -g mouse off
3
4set -g status-bg black
5set -g status-fg white
bash
CommandWhat it does
ctrl+q arrowsNavigate windows (tmux)
ctrl+q %Split vertically (tmux)
ctrl+q "Split horizontally (tmux)
ctrl+q zToggle window full screen (nice one!)
[Enter scroll mode
qLeave scroll mode
1vim file1 file2
2vim -O file1 file2 # split vertically
shell
CommandWhat it does
:bnDisplay next buffer
:bpDisplay previous buffer
:bdDelete buffer
:lsList buffers
CommandWhat it does
uUndo
ctrl+rRedo
ctrl+wwNavigate to buffer
:vsplitSplit vertically
ctrl + w _Set height of split to max
ctrl + w |Set width of split to max
CommandWhat it does
vEnter visual mode per character
VEnter visual mode per line
ZZWrite file, if modified, and quit Vim
(jumps to the previous sentence
)jumps to the next sentence
{jumps to the previous paragraph
}jumps to the next paragraph
[[jumps to the previous section
]]jumps to the next section
[]jump to the end of the previous section
][jump to the end of the next section
aInsert text after the cursor
AInsert text at the end of the line
iInsert text before the cursor
oBegin a new line below the cursor
OBegin a new line above the cursor
GoAdd a new line at the end of the file
:%s/wrong/right/gcFind and replace
/fooSearch and highlight foo
:nohStop highlihghting foo
:rReplace current character
:RReplace current character and stay in insert mode
CommandWhat it does
ci "Change text between quotes works with {, [ and so on
.Repeat