-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
executable file
·79 lines (64 loc) · 1.99 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
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
endif
set nocompatible
set backspace=indent,eol,start
syntax on
set guifont=Consolas:h14:cANSI
syntax enable
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set cindent
set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s
set ts=4
set nu
"colorscheme koehler "set the colour
colorscheme molokai
set ruler
set cursorline
set hlsearch
set showmatch
set cursorline
"C-Support configuration
runtime vimrc_example.vim
"
filetype plugin on
"Cscope plugin configuration
set cscopequickfix=s-,c-,d-,i-,t-,e-
autocmd FileType qf wincmd J
nmap <F9> :cn<cr>
nmap <F10> :cp<cr>
"Ctags confing
nmap <F4> :TagbarToggle<CR>
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
let g:tagbar_ctags_bin = 'ctags'
let g:tagbar_autofocus = 1
let Tlist_Show_One_File = 1
let Tlist_Exit_OnlyWindow = 1
let g:tagbar_width = 30 "设置taglist的宽度
let g:tagbar_left = 1 "default right show
if &diff
colorscheme midnight
else
colorscheme molokai
autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen()
autocmd VimEnter * wincmd w
endif
"autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen()
autocmd VimEnter * wincmd w
"Tagbar NERDTree
map <F7> :NERDTreeToggle<CR>
map <S-w> :NERDTreeToggle<CR>
autocmd VimEnter * wincmd w
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif "当NERDTree为剩下的唯一窗口时自动关闭
let g:NERDTreeDirArrowExpandable = '▸' "设置树的显示图标
let g:NERDTreeDirArrowCollapsible = '▾'
let g:nerdtree_tabs_open_on_console_startup=1
let NERDTreeWinSize=20
let g:NERDTreeWinPos='right'
"autocmd BufNew * wincmd p
"生成目录索引文件命令
"ctags -R .