====== VI, VIM ====== * description : VI 사용법 및 Tip 기술 * author : 주레피 * email : dhan@repia.com * lastupdate : 2020-06-04 ===== Case Study ===== .vimrc 설정 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 > [[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 제거 ESC : 1,$ s/^M//g Enter > ':' 명령어 모드로 진입 (ESC + ':') > 정규표현식 작성 > 1,$ mean 1줄 부터 마지막 줄까지 > ^M -> Ctrl키를 누른 상태에서 vm 이어서 타이핑 > s/찾을 문자열/대체 문자열/g \\ 탭 사이트 조절 : set tabstop=4 > 기본은 space 8 \\ 라인 표시 : set nu > 반대는 set nonu \\ ===== Ctags 사용법 ===== [[https://blueyikim.tistory.com/668|[툴] ctags 사용법]] \\ {{tag>주레피 vi 빔 vim}}