Hyperledger

본문 바로가기
사이트 내 전체검색


Hyperledger
Hyperledger

9. vi - Unix 및 Linux에 쓰이는 표준 편집기

페이지 정보

작성자 관리자 댓글 0건 조회 1,688회 작성일 19-09-21 20:28

본문

9. vi - Unix 및 Linux에 쓰이는 표준 편집기


명령 모드와 삽입 모드


대부분의 워드 프로세싱 소프트웨어와는 달리, vi 편집기는 두 가지 모드를 사용한다


• 명령 모드


• 삽입모드(편집모드)

 

 

명령 모드에서 입력 명령


텍스트를 변경할 수 있도록 한다. 타이핑 오류를 수정 추가하거나 라인을 삭제 등을 할 수 있다.

일반적으로 화면에 나타나지 않는다

일반적으로 대소문자를 구분한다,

 

파일에 텍스트를 추가하려면, 명령 모드에서 i를 누른다.


텍스트의 새 줄을 시작하려면 RETURN 키를 눌러해야 한다.

 

명령 모드로 돌아가려면 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

 

 

댓글목록

등록된 댓글이 없습니다.


개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.