autoread,
autowrite,
background,
cindent,
colorscheme,
encoding,
foldmethod,
History,
hlsearch,
incsearch,
mouse,
number,
ruler,
shiftwidth,
showmatch,
smartindent,
syntax on,
tabstop,
vi,
vim,
vimrc
입사할 무렵부터 vi를 본격적으로 사용하기 시작했습니다.
이제는 울트라에디트나 이클립스보다 vi가 편합니다.
검은 색의 투박한 화면도 익숙하고,
반응 속도도 월등히 빠르죠.
물론 에디터에 불과하기에 기능은 볼품없습니다.
그래도 검은 화면/흰 글씨를 선호하는 사람들이 있기에 vi는 생명령을 이어가고 있습니다.
vim 설정을 위해서는,
~/.vimrc 파일을 수정하면 됩니다.
각자의 쓰임에 따라 vimrc를 구성하면 되는데요,
간단하게 한글로 주석을 달았으니 필요한 부분은 가져가세요.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
" VIM에서 기억할 히스토리 라인수
set history=1000
" Set to auto read when a file is changed from the outside
" 현재 사용하고 있는 파일이 외부에서 수정된 경우 자동으로 읽기
set autoread
" Set to auto write on opening an other file.
" 다른 파일을 읽게 되는 경우 현재 파일을 자동으로 저장하기
" 현재 파일을 저장하지 않으면 ":e" 등으로 다른 파일을 열 수 없음.
set autowrite
" Use mouse or not
" 마우스로 클릭한 위치에 커서 놓기
" 마우스로 드래그한 영역은 비쥬얼 모드로 복사준비하기
" 단 마우스를 사용하면, 마우스 오른 버튼을 눌러 나오는 복사를 선택할 수 없음.
" 마우스를 사용하지 않으려면, ":set mouse-=a"를 치기
set mouse=a
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Always show current position
" 오른편 하단에 현재 위치의 (행, 렬)을 표시
set ruler
" Highlight search results
" 검색결과에 하이라이트 표시하기
set hlsearch
" Makes search act like search in modern browsers
" 한글자 입력할때마다 매치되는 부분 표시하기
set incsearch
" Show matching brackets when text indicator is over them
" 현재 커서가 놓여진 괄호의 짝을 표시하기
set showmatch
" line number
" 라인넘버 표시하기
set number
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" syntax highlight
" 언어 syntax에 하이라이트표시
syntax on
" color scheme
" 컬러스킴
colorscheme desert
set background=dark
" Set utf8 as standard encoding
" utf8을 표준 인코딩으로 사용하기
set encoding=utf8
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" auto indent's tab size
" 자동탭 사이즈를 4칸으로 하기
set shiftwidth=4
" 1 tab == 4 spaces
" 탭을 4칸으로 하기
set tabstop=4
" c style auto indent
" c언어 스타일로 indentation하기
set cindent
" #if has to be first on the line
" #if 문을 라인의 시작에 배치하기
set smartindent
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Coding
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" fold functions by indent or syntax.
" open a folded function using 'zo'
" clase a function using 'zc'
" syntax에 따라 접어두기
" 접은 것을 열려면, zo를 누르기
" 연 것을 다시 접으려면, zc를 누르기
set foldmethod=indent
" 최대 깊이는 1개로 고정
set foldnestmax=1
vimrc를 첨부하니 필요하면 다운로드하세요.
다운로드 받은 파일은 ~/.vimrc 파일명으로 저장하시면 됩니다.
쓸만한 기능이 생기면 계속 추가하겠습니다.
끝_
'IT' 카테고리의 다른 글
[algospot/알고리즘] 알고스팟, '왕초보' 난이도 ENDIANS 풀기 (0) | 2015.06.22 |
---|---|
[SQLite] SQLite의 새로운 수익모델 (0) | 2015.06.21 |
[algospot/알고리즘] 알고스팟에서 HELLOWORLD 문제풀기 (0) | 2015.06.20 |
[Ubuntu/Linux] 우분투 터미널을 위한 최적화된 색상 (4) | 2015.06.19 |
[Ubuntu/Linux] vim에서 edc, embryo, eo 가독성 높이기 (0) | 2015.06.18 |
[Ubuntu/Linux] vimrc의 모든 것 (0) | 2015.06.17 |
[SMACK] 스맥에서 onlycap으로 root 권한 축소하기 (0) | 2015.06.15 |
[SMACK] 스맥에 대한 이야기를 쌓아본다 (0) | 2015.06.14 |
[SMACK] 스맥 레이블을 긋기 위한 manifest의 모든 것 - DBUS편 (0) | 2015.06.14 |
[SMACK] 스맥 레이블을 긋기 위한 manifest의 모든 것 - 파일편 (1) | 2015.06.13 |
[SMACK] 스맥체크의 7가지 단계 (0) | 2015.06.12 |