vi 편집기 명령어
명령 모드로 돌아가려면 Esc 키를 누릅니다.
h , moves cursor left
j , moves cursor down
k , moves cursor up
l , moves cursor right
x , delete character
##x , delete ## characters
dw , delete word
dd , delete line
p , put last deletion after cursor
u , undo last change
i , turn on insert mode (hit the esc key twice to stop)
:w ,write to the file already named
:q , quit editing
:wq , write file and quit
:q! , quit without saving file
ctrl f , move forward one page
ctrl b , move backward one page
:/text , will search for next occurance of 'text' (hitting n will find next occurence)
:?text ,search backward for first occurrence of text
G , go to end of file
1G , go to first line of file
set nu , to set line number
:w filename , write to the file named filename
yy , yank line into buffer
##yy , yank ## lines into general buffer
CONTROL-G print information about file: name, current line number
:%s/pattern/text/ substitute first occurrence of pattern on each line with text
:%s/pattern/text/g substitute every occurrence of pattern with text
p , put contents of general buffer after current line
P , put contents of general buffer before current line
:g/pattern/d delete every line containing pattern
'Cloud Service > CentOS' 카테고리의 다른 글
Oracle VirtualBox 이미지 생성 (0) | 2015.07.03 |
---|