>_FoxiRef
Vim

Vim Cheatsheet

Frequently used Vim commands

#Mode Switching

CommandDescription
iInsert before cursor
IInsert at beginning of line
aInsert after cursor
AInsert at end of line
oOpen new line below
OOpen new line above
EscExit to normal mode
vVisual mode
VVisual line mode
Ctrl+vVisual block mode

#Editing

CommandDescription
xDelete character
ddDelete line
dwDelete word
d$Delete to end of line
DDelete to end of line
yyYank (copy) line
ywYank word
pPaste after cursor
PPaste before cursor
uUndo
Ctrl+rRedo
.Repeat last command
r[char]Replace single character
cwChange word
ccChange entire line
CChange to end of line

#File Operations

CommandDescription
:wSave file
:w [filename]Save as
:qQuit
:q!Quit without saving
:wqSave and quit
:xSave and quit (if changed)
ZZSave and quit
:e [file]Open file
:sp [file]Horizontal split
:vsp [file]Vertical split
Ctrl+w wSwitch windows

#Visual Mode

CommandDescription
v + 이동 + dDelete selection
v + 이동 + yYank selection
v + 이동 + >Indent selection
v + 이동 + <Outdent selection
gvReselect last selection

이 ν¬μŠ€νŒ…μ€ 쿠팑 νŒŒνŠΈλ„ˆμŠ€ ν™œλ™μ˜ μΌν™˜μœΌλ‘œ, 이에 λ”°λ₯Έ μΌμ •μ•‘μ˜ 수수료λ₯Ό μ œκ³΅λ°›μŠ΅λ‹ˆλ‹€.