-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
118 lines (76 loc) · 1.54 KB
/
.vimrc
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
" Syntax Highlighting
syntax on
"this makes me comfortable"
colorscheme default
"allow cursor keys
set esckeys
"allow backspace in insert mode
set backspace=indent,eol,start
"auto indent
set autoindent
set cindent
set ignorecase
"show status line always
set laststatus=2
"enable mouse in all modes
set mouse=a
set scrolloff=3
" add the g flag to search/replace by default
set gdefault
"show filename
set title
"line number
set nu
"Use mouse
set mouse=a
"show col row at right bottom
set ruler
"Hightlight search results
set hlsearch
"한글자 입력할 때마다 매치되는 부분 표시하기
set incsearch
"show matching brackets
set showmatch
"set utf8 as standard encoding
set encoding=utf8
"2 spaces == 1tab
set tabstop=2
"auto indent's tab size
set shiftwidth=2
"enable ctags"
set tags=./tags,tags
set tags+=~/pintos/src/tags
set tags+=~/system_prog/lecture_sysprog/02_file_io/tags
"using cscope"
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
function! AddCscopeDatabase()
let currentdir = getcwd()
while !filereadable("cscope.out") && getcwd() != "/"
cd ..
endwhile
if filereadable("cscope.out")
csc add cscope.out
endif
endfunction
call AddCscopeDatabase()
set csverb
"autocomp"
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col-1]!~'\k'
return "\<TAB>"
else
if pumvisible()
return "\<C-N>"
else
return "\<C-N>\<C-P>"
end
endif
endfunction
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
hi Pmenu ctermbg=blue
hi PmenuSel ctermbg=yellow ctermfg=black
hi PmenuSbar ctermbg=blue