vim配置文件备份

2960阅读 0评论2019-04-09 laoyouji
分类:嵌入式

set showmatch
set incsearch
set mouse=a
set cindent
set hlsearch
set tabstop=4
set softtabstop=4
set shiftwidth=4
set nu
set tags=tags;
set autochdir

let Tlist_Show_One_File = 1            " -------只允许taglist显示一个文件的信息  
let Tlist_Exit_OnlyWindow = 1            " ---------当显示taglist信息的窗口是最后一个时,退出vim  
let Tlist_Process_File_Always = 1        " -----时时更新taglist  
let Tlist_Auto_Open = 1

"cscope插件热键
nmap cs :cs find s =expand("")
nmap cg :cs find g =expand("")
nmap cc :cs find c =expand("")
nmap cd :cs find d =expand("")
nmap ct :cs find t =expand("")
nmap ce :cs find e =expand("")
nmap cf :cs find f =expand("")
nmap ci :cs find i ^=expand("")

" add any cscope database in current directory
if has("cscope")
    set cscopetag
    set csto=0
    if filereadable("cscope.out") " 若当前目录下存在cscope数据库,添加该数据库到vim
        cs add cscope.out
    elseif $CSCOPE_DB != "" " 否则只要环境变量CSCOPE_DB不为空,则添加其指定的数据库到vim
        cs add $CSCOPE_DB
    endif
endif




上一篇:vim + Cscope + YouCompleteMe 实现自动补全与函数查找跳转
下一篇:没有了