个人常用的vimrc配置_dssm

.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 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>





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值