From 7f6642486ab606a86e3eb6ec59130de86b835330 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 4 Jul 2008 10:39:16 +0200 Subject: Vim files with source code colors and VCS commands --- vimrc | 63 +++++++-------------------------------------------------------- 1 file changed, 7 insertions(+), 56 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index fe746ed..721e6f3 100644 --- a/vimrc +++ b/vimrc @@ -56,13 +56,13 @@ map zA map :bN " 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 :cs find g =expand("") " find global definition map :cs find c =expand("") " find callers of function under cursor @@ -71,64 +71,15 @@ elseif has("cscope") map :cs find f =expand("") " find file under cursor map :cs find i =expand("") " find files including file under cursor map :cs find I % " 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 - " 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 -- cgit v1.2.3