forked from seaofnight/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvim.example
68 lines (58 loc) · 2.59 KB
/
vim.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
set number " 라인 넘버를 보여준다
set mouse=a " 마우스를 클릭하는 곳으로 커서를 옮긴다
set autoindent "indent를 다음줄에도 유지한다
set smartindent "문법에 맞게 자동으로 indent를 넣어준다
"(e.g., 괄호 다음줄에 자동으로 indent 적용
autocmd FileType c,cpp,java :set cindent "지정된 filetype에 대해 cindent를 적용한다
set cinoptions=g0,t0 "switch~case문 등 세부 indent를 정의한다
"참고(http://vimdoc.sourceforge.net/htmldoc/indent.html)
set tabstop=4 "Tab의 크기를 결정한다
set shiftwidth=4 "indent의 크기를 결정한다
set expandtab "Tab을 공백(space)으로 자동 전환한다
set ignorecase "검색할 때 대소문자 구분을 하지 않는다
set smartcase "검색할 때 대문자를 섞어 사용하면 대소문자 구분하여 검색하고,
"소문자로만 쓰면 대소문자 구분을 하지 않는다
set incsearch "검색시 단어 전체를 입력하지 않아도, 입력된 글자까지 순차적으로 검색한다
set hlsearch "검색된 단어를 highlight 한다
set title "상단에 파일 이름을 표시해준다
set ruler "하단에 현재 커서의 위치를 표시해준다
colo default "color set을 결정한다
set textwidth=90
set colorcolumn=+1 "91번째줄 색을 바꾼다(line length 맞추기 위한 guideline)
hi ColorColumn ctermbg=235 "세로줄 색깔
set hlsearch " 검색어 하이라이팅
set nu " 줄번호
set autoindent " 자동 들여쓰기
set scrolloff=2
set wildmode=longest,list
set ts=4 "tag select
set sts=4 "st select
set sw=1 " 스크롤바 너비
set autowrite " 다른 파일로 넘어갈 때 자동 저장
set autoread " 작업 중인 파일 외부에서 변경됬을 경우 자동으로 불러옴
set cindent " C언어 자동 들여쓰기
set bs=eol,start,indent
set history=256
set laststatus=2 " 상태바 표시 항상
"set paste " 붙여넣기 계단현상 없애기
set shiftwidth=4 " 자동 들여쓰기 너비 설정
set showmatch " 일치하는 괄호 하이라이팅
set smartcase " 검색시 대소문자 구별
set smarttab
set smartindent
set softtabstop=4
set tabstop=4
set ruler " 현재 커서 위치 표시
set incsearch
set statusline=\ %<%l:%v\ [%P]%=%a\ %h%m%r\ %F\" 마지막으로 수정된 곳에 커서를 위치함
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif" 파일 인코딩을 한국어로
if $LANG[0]=='k' && $LANG[1]=='o'
set fileencoding=korea
endif" 구문 강조 사용
if has("syntax")
syntax on
endif" 컬러 스킴 사용
colorscheme jellybeans