From 25a9f9ad3e2481f21f9d0c2fa749258ae206b322 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 28 Apr 2017 17:06:55 +0200 Subject: fixed order, added some cscope shortcuts from vim.wikia --- vimrc | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 78f34a1..e733275 100644 --- a/vimrc +++ b/vimrc @@ -337,11 +337,31 @@ if has("gui_running") set winaltkeys=menu | " behave like other windows: ALT-key can be used to open the menu (and cannot be :remaped) endif + +if has('cscope') + " http://vim.wikia.com/wiki/Cscope + set cscopetag cscopeverbose + + if has('quickfix') + set cscopequickfix=s-,c-,d-,i-,t-,e- + endif + + cnoreabbrev csa cs add + cnoreabbrev csf cs find + cnoreabbrev csk cs kill + cnoreabbrev csr cs reset + cnoreabbrev css cs show + cnoreabbrev csh cs help + + command -nargs=0 Cscope cs add $VIMSRC/src/cscope.out $VIMSRC/src +endif + + if bufname('%') == '' set bufhidden=wipe endif -noautocmd +" noautocmd if has("autocmd") set modeline | " set variables specific to a file, like indentation by adding a comment @@ -354,10 +374,10 @@ if has("autocmd") autocmd BufWritePost $MYVIMRC source $MYVIMRC augroup END " } - augroup extra_whitespace + augroup extra_whitespace " { highlight ExtraWhitespace ctermbg=red guibg=red syn match ExtraWhitespace /\s\+$/ - augroup END + augroup END "} augroup set_window_title " { " autocmd BufWinEnter quickfix setl statusline=%t @@ -499,6 +519,8 @@ else endif +highlight ExtraWhitespace ctermbg=red guibg=red +syn match ExtraWhitespace /\s\+$/ if !has('nvim') -- cgit v1.2.3