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 nocpset nuset pasteset foldmethod=marker set nobackupset noswapfileset 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 expandtabset sw=4set smarttabset ambiwidth=double " Format relatedset tw=78set lbrset fo+=mB " Indent relatedset cinset aiset cino=:0g0t0(2su2sset autoindent " Editing relatedset backspace=indent,eol,startset whichwrap=b,s,<,>,[,]"set mouse=aset selectmode="set mousemodel=popupset keymodel=set selection=inclusive " Miscset wildmenu"set spell " Encoding relatedset encoding=utf-8let &termencoding=&encodingset fileencodings=ucs-bom,utf-8,cp936,gb,big5,euc-jp,euc-kr,latin1 " File type relatedfiletype plugin indent onset completeopt=longest,menu,preview " Display relatedset ruset smset hls" GUIif (has("gui_running")) set guioptions+=b set guioptions-=T set guioptions-=m colo desert set nowrapelse set wrapendifsyntax 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> " TListlet Tlist_Use_Right_Window=1let Tlist_File_Fold_Auto_Close=1let Tlist_Show_One_File=1let Tlist_Exit_OnlyWindow=1let Tlist_Use_SingleClick=1let Tlist_Auto_Open=0let Tlist_Auto_Update=1let Tlist_Enable_Fold_Column = 0map tl :Tlist<CR> " WinManagerlet 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 " Alet g:alternateNoDefaultAlternate=1 " MiniBufferlet g:miniBufExplMapCTabSwitchBufs = 1let g:miniBufExplMapWindowNavVim = 1let g:miniBufExplMapWindowNavArrows = 1let g:miniBufExplModSelTarget = 1 " for taglistlet g:miniBufExplUseSingleClick = 1map bn :bn<CR>map bp :bp<CR> " Cscopeset cscopequickfix=s+,c-,d-,i-,t-,e- " quickfixnmap <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> " Grepnnoremap <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 _vimrcautocmd! bufwritepost _vimrc source %
|
浙公网安备 33010602011771号