vim配置文件
常用插件:minibufexpl.vim taglist.vim winfileexplorer.vim winmanager.vim wintagexplorer.vim
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
set nocp set nu set paste set foldmethod=marker set nobackup set noswapfile set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")} set laststatus= 2 " 光标总在中间 set scrolloff= 3 " Tab related " retab set ts= 4 " set expandtab set sw= 4 set smarttab set ambiwidth=double " Format related set tw= 78 set lbr set fo+=mB " Indent related set cin set ai set cino=:0g0t0(2su2s set autoindent " Editing related set backspace=indent,eol,start set whichwrap=b,s,<,>,[,] " set mouse=a set selectmode= " set mousemodel=popup set keymodel= set selection=inclusive " Misc set wildmenu " set spell " Encoding related set encoding=utf- 8 let &termencoding=&encoding set fileencodings=ucs-bom,utf- 8 ,cp936,gb,big5,euc-jp,euc-kr,latin1 " File type related filetype plugin indent on set completeopt=longest,menu,preview " Display related set ru set sm set hls " GUI if (has( "gui_running" )) set guioptions+=b set guioptions-=T set guioptions-=m colo desert set nowrap else set wrap endif syntax on " ============================================================================ " Plugins settings " ============================================================================ " Ctags " set tags=./tags,./../tags,./../.. /**/ tags,. /**/ tags " set tags+=/opt/glibc- 2.4 /tags set tags=tags;/ map <F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . <CR> " TList let Tlist_Use_Right_Window= 1 let Tlist_File_Fold_Auto_Close= 1 let Tlist_Show_One_File= 1 let Tlist_Exit_OnlyWindow= 1 let Tlist_Use_SingleClick= 1 let Tlist_Auto_Open= 0 let Tlist_Auto_Update= 1 let Tlist_Enable_Fold_Column = 0 map tl :Tlist<CR> " WinManager let g:winManagerWindowLayout = "FileExplorer" let g:persistentBehaviour = 1 "map <F2> :WMToggle<CR> map wm :WMToggle<CR> "map <F3> :wa<cr>:TlistUpdate<cr>:FirstExplorerWindow<cr><F5><c-w>b " A let g:alternateNoDefaultAlternate= 1 " MiniBuffer let g:miniBufExplMapCTabSwitchBufs = 1 let g:miniBufExplMapWindowNavVim = 1 let g:miniBufExplMapWindowNavArrows = 1 let g:miniBufExplModSelTarget = 1 " for taglist let g:miniBufExplUseSingleClick = 1 map bn :bn<CR> map bp :bp<CR> " Cscope set cscopequickfix=s+,c-,d-,i-,t-,e- " quickfix nmap <silent>cl :cl<cr> nmap <silent>cn :cn<cr> nmap <silent>cp :cp<cr> nmap <silent>cw :cw 10 <cr> nmap <silent>ccl :ccl<cr> " Grep nnoremap <silent> <F3> :Grep<CR> "============================================================================= " Platform dependent settings "============================================================================= if (has( "win32" )) "------------------------------------------------------------------------- " Win32 "------------------------------------------------------------------------- if (has( "gui_running" )) set guifont=Bitstream_Vera_Sans_Mono:h9:cANSI set guifontwide=NSimSun:h9:cGB2312 endif else if (has( "gui_running" )) set guifont=DejaVu\ Sans\ Mono\ 10 endif endif " C的编译和运行 map <F5> :call CompileRunGcc()<CR> func! CompileRunGcc() exec "w" exec "!gcc % -o %<" exec "! ./%<" endfunc " C++的编译和运行 map <F6> :call CompileRunGpp()<CR> func! CompileRunGpp() exec "w" exec "!g++ % -o %<" exec "! ./%<" endfunc " autoload _vimrc autocmd! bufwritepost _vimrc source %
|