-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvimrc.plugin
58 lines (48 loc) · 1.88 KB
/
vimrc.plugin
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
"插件配置
"a配置
"c配置
"taglist配置,如果当前目录存在tags文件的话则追加该文件到tag列表中
if filereadable("tags")
set tags+=tags
endif
"不同时显示多个文件的tag,只显示当前文件的
"let Tlist_Show_One_File = 1
"如果taglist窗口是最后一个窗口,则退出vim
let Tlist_Exit_OnlyWindow = 1
"折叠除了当前文件以外的文件
let Tlist_File_Fold_Auto_Close = 1
"打开taglist时自动获取光标
let Tlist_GainFocus_On_ToggleOpen = 1
"cscope配置,如果当前目录存在cscope.out文件的话则自动添加到cscope数据库
if filereadable("cscope.out")
cs add cscope.out
endif
"cscope键绑定,使用C-\ 和相应的参数使用
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-\>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>
"minibufexpl配置
"C-hjkl切换窗口
let g:miniBufExplMapWindowNavVim = 1
"C-方向键切换窗口
let g:miniBufExplMapWindowNavArrows = 1
"C-tab键切换buffer
let g:miniBufExplMapCTabSwitchBufs = 1
"调整窗口显示方式,使其与taglist可以共存
let g:miniBufExplModSelTarget = 1
"supertab配置
"记住上次使用的补全方式,按下tab键时重复
"let g:SuperTabRetainCompletionType = 2
"如从未使用omni补全,那么使用默认行为
"let g:SuperTabDefaultCompletionType = "<C-X><C-o>"
"expand_region配置
"键映射,K扩大区域,J缩小区域
"noremap H <Plug>(expand_region_expand)
"noremap L <Plug>(expand_region_shrink)
map <Leader>l <Plug>(expand_region_expand)
map <Leader>h <Plug>(expand_region_shrink)