사용자 도구

사이트 도구


wiki:os:unix:editor:vi

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
wiki:os:unix:editor:vi [2020/06/04 14:07]
dhan 만듦
wiki:os:unix:editor:vi [2023/06/01 11:40] (현재)
dhan
줄 1: 줄 1:
-====== VI ======+====== VI, VIM ======
 <WRAP left notice 80%> <WRAP left notice 80%>
   * description : VI 사용법 및 Tip 기술   * description : VI 사용법 및 Tip 기술
줄 9: 줄 9:
  
 ===== Case Study ===== ===== Case Study =====
 +.vimrc 설정  
 +<code bash>
 +filetype plugin indent on
 +" show existing tab with 4 spaces width
 +set tabstop=4
 +" when indenting with '>', use 4 spaces width
 +set shiftwidth=4
 +" On pressing tab, insert 4 spaces
 +set expandtab
 +</code>  
 +> [[https://stackoverflow.com/questions/234564/tab-key-4-spaces-and-auto-indent-after-curly-braces-in-vim|Tab key == 4 spaces and auto-indent after curly braces in Vim]]
 파일내 ^M 제거 파일내 ^M 제거
 <code> <code>
 +ESC
 : :
 1,$ s/^M//g 1,$ s/^M//g
 Enter Enter
 </code> </code>
-> ':' 명령어 모드로 진입+> ':' 명령어 모드로 진입 (ESC + ':')
 > 정규표현식 작성 > 정규표현식 작성
 > 1,$ mean 1줄 부터 마지막 줄까지 > 1,$ mean 1줄 부터 마지막 줄까지
줄 21: 줄 33:
 > s/찾을 문자열/대체 문자열/ > s/찾을 문자열/대체 문자열/
 \\ \\
-{{tag>주레피 vi}}+탭 사이트 조절 
 +<code> 
 +
 +set tabstop=4 
 +</code> 
 +> 기본은 space 8 
 +\\ 
 +라인 표시 
 +<code> 
 +
 +set nu 
 +</code> 
 +> 반대는 set nonu 
 +\\ 
 + 
 +===== Ctags 사용법 ===== 
 +[[https://blueyikim.tistory.com/668|[툴] ctags 사용법]] \\ 
 + 
 + 
 +{{tag>주레피 vi 빔 vim}} 
/volume1/web/dokuwiki/data/attic/wiki/os/unix/editor/vi.1591247275.txt.gz · 마지막으로 수정됨: 2022/03/10 19:52 (바깥 편집)