Cheatography
https://cheatography.com
Unite
b |
buffers |
CTRL-p |
Search project |
nVim
[<Space> |
Add new line before |
]<Space> |
Add new line after |
[e |
Exchange the current line with [count] lines above it. |
]e |
Exchange the current line with [count] lines below it |
,h |
Remove Hilight |
<C-z> after fg |
Stop vim and continue after |
:!<command> |
Run prompt command |
gn/gN |
Visual mark searched text |
<C-r> |
Paste on insert mode |
zi |
Folding on/off |
<space> |
Open close fold |
zc |
Close parent folds also |
zM |
Close all folds |
zv |
open fold where cursor |
zf |
manual fold visually selected |
Move lines
command ::::move |
44/+3/-3 moves line |
|
|
Multiple cursors
<C-n> |
Mark and move next |
<C-p> |
Mark and move previous |
<C-x> |
Skip |
init.vim
,v |
Edit init.vim |
,s |
Source init.vim |
Tabs
TabooRename |
<C-w><S-t> |
Move pane into tab |
Git
p on Gstatus |
interactive hank add |
:Gstatus |
Status of the files |
- |
Add/Remove files from index |
Gdiff |
vimDiff for the file we're on |
]c |
Advance to the next block with differences |
[c |
Previous diff |
do |
Get hunk from the other pane |
dp |
Push hunk to the other pane |
zo/zc |
fold open/close |
zr/zm |
Complete file open/close |
<S-c> or :Gcommit |
on :Gstatus commit |
|
|
Delete / Change
dw/db |
Delete next/previous word |
cw/cb |
Change next/previous word |
dd/cc |
Delete/Change entire line |
dj/cj |
Delete/Change two lines downward |
dk/ck |
Delete/Change two lines upward |
d/c [motion] |
Delete/Change according to motion |
di'/ci' |
Delete/Change inside ' |
da'/ca' |
Delete change include ' |
=3j |
Autoindent 3 lines down |
Search and Replace
/ |
Search |
? |
Search before |
:%s/old/new |
Replace |
:%s/old/new/c |
prompt before |
:%s/old/new/g |
globally |
:%s/old/new/gcI |
change globally case instinctive |
:5,12s/foo/bar/g |
Change each 'foo' to 'bar' for all lines from line 5 to line 12 (inclusive) |
:.,+2s/foo/bar/g |
Change each 'foo' to 'bar' for the current line (.) and the two next lines (+2) |
Splits
<C- h/j/k/l> |
Move to * pane |
<C-w> +/- |
Increace/Decrease pane height |
<C-w> >/</= |
Increace/Decrease/Equal pane width |
<C-w> o |
Close all splits but the one is active |
Unite
<Space>/ |
Search lines |
<C-p> |
Search files |
<Space>b |
Search buffers |
<Space>y |
Search yanked text |
<Space>t |
Switch tab |
Terminal
<esc> |
exit terminal mode |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
More Cheat Sheets by yograf