" Make external commands work through a pipe instead of a pseudo-tty
"set noguipty
" You can also specify a different font, overriding the default font
if has('gui_gtk2')
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12
else
set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
endif
set fileencodings=utf8,iso8859,gbk
syntax on
" Taglist setting
let Tlist_Show_One_File=1 "不同时显示多个文件的tag,只显示当前文件的
let Tlist_Exit_OnlyWindow=1 "如果taglist窗口是最后一个窗口,则退出vim
let Tlist_Auto_Open=1
let Tlist_Ctags_Cmd="/usr/bin/ctags" "将taglist与ctags关联
" vim setting
set mouse=a " always use mouse
set nu "display num
set showmatch "show matching bracets自动匹配
set hlsearch "highlight searching things
colorscheme evening
filetype on "check file type
set history=1000 "记录历史的行数
set autoindent "自动对齐
set cindent "c对齐
set smartindent " 只能自动对齐
set tabstop=4 " tab = 4 space
set shiftwidth=4 " 当前行交错时使用4空格
" ctags setting
"settags=
"set autochdir
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
set tags=./tags,../tags,../../tags,../../../tags,../../../../tags,../../../../../tags,../../../../../../tags,../../../../../../../tags,../../../../../../../../tags,../../../../../../../../../tags,../../../../../../../../../../tags
set cscopetag
set hls
if has("cscope")
set csprg=/usr/local/bin/gtags-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
cs add GTAGS
set csverb
" Using 'CTRL-\' then a search type makes the vim window
" "shell-out", with search results displayed on the bottom
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>
" Using 'CTRL-spacebar' then a search type makes the vim window
" split horizontally, with search result displayed in
" the new window.
nmap <C-[>s :scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-[>g :scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-[>c :scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-[>t :scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-[>e :scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-[>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-[>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-[>d :scs find d <C-R>=expand("<cword>")<CR><CR>
" Hitting CTRL-space *twice* before the search type does a vertical
" split instead of a horizontal one
nmap <C-[><C-[>s :vert scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-[><C-[>g :vert scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-[><C-[>c :vert scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-[><C-[>t :vert scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-[><C-[>e :vert scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-[><C-[>i :vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-[><C-[>d :vert scs find d <C-R>=expand("<cword>")<CR><CR>
endif
" If you want to run gvim with a dark background, try using a different
" colorscheme or running 'gvim -reverse'.
" http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/ has examples and
" downloads for the colorschemes on vim.org
" Source a global configuration file if available
" XXX Deprecated, please move your changes here in /etc/vim/gvimrc
if filereadable("/etc/vim/gvimrc.local")
source /etc/vim/gvimrc.local
endif
nmap <C-g>] :GtagsCursor<CR><CR>
.vimrc" Make external commands work through a pipe instead of a pseudo-tty"set noguipty" You can also specify a different font, overriding the default fontif has('gui_gtk2') set guifont=Bitstream\ Vera\ Sans\ Mono\ 12else set guifont=-misc-fixed-