算是一个备份吧,自我感觉.vimrc配置的还不错
1set helplang=cn "
2set encoding=utf-8 "utf-8
3set fileencodings=gbk,utf8 "gbk
4
5colorscheme koehler "
6set guifont=Bitstream\ Vera\ Sans\ Mono\ 12 "Bitstream Vera Sans Mono 12
7set tabstop=4 "tab
8"set expandtab "tab Makefiletab
9set backspace=2 "
10set nu "
11"set wrap "
12"set nowrap "
13set linebreak ",,
14set whichwrap=b,s,<,>,[,] "
15"set list "
16"set listchars=tab:.\ ,trail:. "'. '
17set autochdir "
18set hidden ",bufferbuffer
19set scrolloff=5 ",.
20
21"Toggle Menu and Toolbar
22"set guioptions-=m
23"set guioptions-=T
24"map <silent> <F2> : if &guioptions =~# 'T' <bar>
25" \set guioptions-=T <bar>
26" \set guioptions-=m <bar>
27" \else <Bar>
28" \set guioptions+=T <bar>
29" \set guioptions+=m <bar>
30" \endif<CR>
31
32"========================================================================================================
33"/
34"========================================================================================================
35set hlsearch "
36set incsearch "
37set gdefault ",g. ,
38"========================================================================================================
39"
40"========================================================================================================
41set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%] ": ,
42set ruler ",
43"========================================================================================================
44"C++
45"========================================================================================================
46syntax enable "
47syntax on "
48 ".vim/syntax/c.vim,
49set showmatch ",
50set smartindent "
51set shiftwidth=4 ",4
52set autoindent "
53set ai "
54
55"--------------------------------------------------------------------------------------------------------
56"
57"--------------------------------------------------------------------------------------------------------
58
59"--------------------------------------------------------------------------------------------------------
60"
61"--------------------------------------------------------------------------------------------------------
62nmap wv <C-w>v "
63nmap wc <C-w>c "
64nmap ws <C-w>s "
65
66"-------------------------------------------------------------------------------------------------------
67"
68"--------------------------------------------------------------------------------------------------------
69
70"TList
71let Tlist_Show_One_File=1
72let Tlist_Exit_OnlyWindow=1 "Tlist
73
74"winmannger
75let g:winManagerWindowLayout='FileExplorer|TagList' "winmanagerTagList
76nmap wm :WMToggle<cr> "winmanager
77
78
79:cs add /vobs/spectre_dev/tools.src/dfII/group/cscope.out /vobs/spectre_dev/tools.src/dfII/group/
80:set cscopequickfix=s-,c-,d-,i-,t-,e-
81nmap <F5>s :cs find s <C-R>=expand("<cword>")<CR><CR> nmap <F5>g :cs find g <C-R>=expand("<cword>")<CR><CR> nmap <F5>c :cs find c <C-R>=expand("<cword>")<CR><CR> nmap <F5>t :cs find t <C-R>=expand("<cword>")<CR><CR> nmap <F5>e :cs find e <C-R>=expand("<cword>")<CR><CR> nmap <F5>f :cs find f <C-R>=expand("<cfile>")<CR><CR> nmap <F5>i :cs find i <C-R>=expand("<cfile>")<CR>$<CR> nmap <F5>d :cs find d <C-R>=expand("<cword>")<CR><CR>
82
83"nmap <C-_>s :cs find s <C-R>=expand("<cword>")<CR><CR> "nmap <C-_>g :cs find g <C-R>=expand("<cword>")<CR><CR> "nmap <C-nmanager_>c :cs find c <C-R>=expand("<cword>")<CR><CR> "nmap <C-_>t :cs find t <C-R>=expand("<cword>")<CR><CR> "nmap <C-_>e :cs find e <C-R>=expand("<cword>")<CR><CR> "nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR> "nmap <C-_>i :cs find i <C-R>=expand("<cfile>")<CR>$<CR> "nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>
84
85"QuickFix
86nmap <F6> :cw<cr> "quickfix
87nmap <F8> :cn<cr> "
88nmap <F7> :cp<cr> "
89
90"MiniBufExp
91"let g:miniBufExplMapWindowNavVim = 1 "<C-h,j,k,l>
92"let g:miniBufExplMapWindowNavArrows = 1 "<C->
93let g:miniBufExplMapWindowNavVim = 1
94let g:miniBufExplMapWindowNavArrows = 1
95let g:miniBufExplMapCTabSwitchBufs = 1
96let g:miniBufExplModSelTarget = 1
97
98"BufTab
99"noremap <C-h> :bprev<CR> "<C-h>buffer
100"noremap <C-l> :bnext<CR> "<C-l>buffer
101"let g:buftabs_only_basename=1 "
102"set laststatus=2 "buffer
103"let g:bunmanagerknmanagerwmftabs_in_statusline=1
104
105"A
106nnoremap <silent> <F9> :AV<cr> "F9/,.h/.c
107let g:alternateSearchPath = 'sfr:./,sfr:../include,sfr:../../include,sfr:../source,sfr:../src,sfr:../inc'
108
109"Grep
110"F3Grep
111nnoremap <silent> <F3> :Grep<cr>
112"
113nmap cp
114filetype plugin indent on
115set completeopt=longest,menu
116"
117"let g:SuperTabRetainCompletionType=2
118"let g:SuperTabDefaultCompletionType="<C-X><C-O>"
119
120"Doxygen
121let g:DoxygenToolkit_blockHeader="--------------------------------------------------------------------------"
122let g:DoxygenToolkit_blockFooter="----------------------------------------------------------------------------"
123let g:DoxygenToolkit_authorName="houcy"
124let g:DoxygenToolkit_briefTag_funcName = "yes"
125map <F4>a :DoxAuthor<cr>
126map <F4>f :Dox<cr>
127map <F4>b :DoxBlock<cr>
128map <F4>c O/** */<Left><Left>
129
130
131"robixctagscscope
132"/home/aleln/workspace/
133set tags=/vobs/spectre_dev/tools.src/dfII/group/tags
134
配置好了就可以使用各种插件了,很方便程序代码跟踪分析,上图为证: