diff options
author | Hugues Hiegel <hugues.hiegel@sagem.com> | 2008-07-04 10:39:16 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@sagem.com> | 2008-07-04 10:39:16 +0200 |
commit | 7f6642486ab606a86e3eb6ec59130de86b835330 (patch) | |
tree | 54dd7e7b47a0a7cc1f81413ff4940ba3574756b8 /vimrc | |
parent | 34317b17cd3408d89684816da34d744c04256102 (diff) |
Vim files with source code colors and VCS commands
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 63 |
1 files changed, 7 insertions, 56 deletions
@@ -56,13 +56,13 @@ map <F9> zA map <C-B> :bN<CR> " Load local cscope db if exists -if filereadable( expand("tags") ) +if filereadable( expand("$PWD/tags") ) set tags=tags -elseif filereadable( expand("ctags.out") ) - set tags=ctags.out +elseif filereadable( expand("$ROOT/ctags.out") ) + set tags=$ROOT/ctags.out elseif has("cscope") - if filereadable( expand("cscope.out") ) - set cscopetag + if filereadable( expand("$ROOT/cscope.out") ) + set cst " cscope macros map <C-]> :cs find g <C-R>=expand("<cword>")<CR><CR> " find global definition map <C-[> :cs find c <C-R>=expand("<cword>")<CR><CR> " find callers of function under cursor @@ -71,64 +71,15 @@ elseif has("cscope") map <C-f> :cs find f <C-R>=expand("<cword>")<CR><CR> " find file under cursor map <C-i> :cs find i <C-R>=expand("<cword>")<CR><CR> " find files including file under cursor map <C-i> :cs find I %<CR> " find files including current file - cs add cscope.out + cs add $ROOT/cscope.out $ROOT endif endif -function! SourceCodeColors() - " local syntax file - set colors on a per-machine basis: - " vim: tw=0 ts=4 sw=4 - " Vim color file - " Maintainer: Ron Aaron <ron@ronware.org> - " Last Change: 2003 May 02 - - hi clear - set background=dark - if exists("syntax_on") - syntax reset - endif - let g:colors_name = "my_pablo" - - highlight Comment ctermfg=7 cterm=bold - highlight Constant ctermfg=4 cterm=none - highlight Number ctermfg=4 cterm=none - highlight String cterm=bold - highlight Identifier ctermfg=3 cterm=bold - highlight Function ctermfg=4 cterm=bold - highlight Statement ctermfg=3 cterm=bold - highlight cConditional ctermfg=3 cterm=bold - highlight cStatement ctermfg=2 cterm=bold - highlight cLabel ctermfg=2 cterm=bold,underline - highlight Label ctermfg=3 cterm=bold,underline - highlight PreProc ctermfg=6 cterm=none - highlight Type ctermfg=4 cterm=underline - highlight Special ctermfg=4 cterm=bold - highlight cFormat ctermfg=6 cterm=bold - highlight Error cterm=bold - highlight Todo ctermfg=0 ctermbg=3 cterm=bold - highlight Directory ctermfg=2 - "highlight Normal - highlight Search ctermbg=3 - - highlight DiffAdd term=bold cterm=none ctermfg=none ctermbg=black - highlight DiffChange term=bold cterm=none ctermfg=none ctermbg=black - highlight DiffDelete term=reverse cterm=none ctermfg=black ctermbg=none - highlight DiffText term=underline cterm=none ctermfg=none ctermbg=red - - highlight StatusLine ctermfg=3 ctermbg=0 cterm=none guifg=#ffff00 guibg=#0000ff gui=none - hi StatusLine term=reverse,bold cterm=bold ctermbg=black ctermfg=yellow - hi StatusLineNC term=reverse cterm=none ctermbg=black ctermfg=none - hi VertSplit term=reverse cterm=none ctermbg=black ctermfg=black - hi Folded term=reverse cterm=bold ctermbg=none ctermfg=green - hi FoldColumn term=reverse cterm=bold ctermbg=none ctermfg=green -endfunction - autocmd BufRead * color zellner -"autocmd BufRead *.[ch] execute SourceCodeColors() +autocmd BufRead *.[ch] color pobla autocmd BufRead *.php color pablo autocmd BufRead /tmp/mutt-*[0-9] color elflord - set title set autoindent set diffopt=iwhite,filler |