if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
if has("cscope")
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
nmap <C-f> :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-c> :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-0>d :cs find d <C-R>=expand("<cword>")<CR><CR>
" nmap T :!`find . -name "*.c" -o -name "*.h" -o -name "*.cpp" > cscope.files && cscope -kqb -i cscope.files && ctags -R --fields=+laimS --extra=+qf --c++-kinds=+p --exclude=.git --exclude=node_modules --exclude=*.js --exclude=*.json \
" --langmap=c:.c.cpp .
"` <CR> :cs reset<CR><CR>
nmap T :!`cscope -kqb -i cscope.files && ctags -R --fields=+laimS --extras=+qf --c++-kinds=+p --exclude=.ini --exclude="dashcam/rootfs/*" --exclude=node_modules --exclude=*.js --exclude=*.json --langmap=c:.c.cpp ` <CR> :cs reset<CR><CR>
nmap t :!git diff % <CR>
noremap <expr>L Test()
map Y yiw
map E viwpyiw
set autoindent
set tabstop=8
colorscheme default
function! Test()
" let b = ": vert diffsplit /home/wst/code/T41UI/wst_t41/UI/" . bufname("") . "\r"
return b
endfunction
function! Gen_csf()
execute "!find . -name \"*.c\" -o -name \"*.h\" -o -name \"*.cpp\" > cscope.files"
endfunction
function InsDate()
let l:date = strftime("%Y-%m-%d %H:%M:%S")
execute "normal i" . l:date
endfunction
function Gen_wst_lang()
let l:word = expand("<cword>")
if len(split(l:word)) == 1
execute "normal BdiwA#define WST_" . toupper(l:word) . " \"" . l:word . "\""
endif
endfunction
function! C_com(num)
let currentLine = line('.')
let startLine = currentLine
let endLine = a:num + startLine
execute startLine . 's/^/\/\*/'
execute endLine . 's/$/ \*\//'
endfunction
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)