-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc.local
More file actions
96 lines (79 loc) · 2.16 KB
/
vimrc.local
File metadata and controls
96 lines (79 loc) · 2.16 KB
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
set cursorline " 突出显示当前行
"set cursorcolumn "高亮当前列
set mouse+=a
"----------------------------------------------------------------------
" map <A_e> <C-o>
" map <A_r> <C-i>
"----------------------------------------------------------------------
set tags=tags;
function! UpdateCtags()
let curdir=getcwd()
while !filereadable("./tags")
cd ..
if getcwd() == "/"
break
endif
endwhile
if filewritable("./tags")
!ctags -R --file-scope=yes --langmap=c:+.h --languages=c,c++ --links=yes
endif
execute ":cd " . curdir
execute ":UpdateTypesFile "
endfunction
nmap <F5> :call UpdateCtags()<CR>
"autocmd BufWritePost *.c,*.h,*.cpp call UpdateCtags()
"autocmd BufReadPre *.c,*.h,*.cpp call UpdateCtags()
if has("cscope")
set csprg=/usr/bin/cscope
set csto=1
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
endif
set csverb
endif
nmap <leader>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <leader>c :cs find c <C-R>=expand("<cword>")<CR><CR>
"----------------------------------------------------------------------
map <C-s> :w<CR>
map <C-q> :q<CR>
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar</span>
set incsearch " 搜索跳转
set hlsearch " 搜索高亮
winpos 1 1
"set lines=38 columns=180
set helplang=cn
set updatetime=100
set fileformats=unix "or set ff=unix
set t_Co=256
"set background=dark
set fileencodings=utf-8,ucs-bom,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set fileencoding=utf-8
set encoding=utf-8
"colorscheme solarized
"字体"set guifont=*
"set guifont=Monospace\ 14
set clipboard=unnamed,unnamedplus
set showcmd
"set mouse=a
"语法高亮
syntax enable
syntax on
"显示行号
set number
"自动缩进与C语言风格缩进
"set autoindent
"set cindent
"缩进宽度
set tabstop=4 "将tab键宽度定义为4"
set shiftwidth=4
set expandtab "用空格代替tab
"switch case 对齐风格
set cino=g0,:0
source $VIMRUNTIME/mswin.vim
behave mswin