"
" My vim rc file
"
" Eirik Nygaard
"

" General settings
set nocompatible
filetype on
set history=1000
set cf
filetype plugin on

" Theme and colors
set background=dark

" Let there be colors
syntax on

" Vim UI
set wildmenu
"set number
set backspace=2
set ruler
set visualbell
set lazyredraw

" Visual clues
set showmatch
set so=5 " Keep x lines for scope
set laststatus=2
set incsearch
set hlsearch
set ignorecase smartcase
set list
set listchars=tab:,trail:

" Text formatting
set fo=tcrqn
set ai
set si
set cindent
set tabstop=8
set softtabstop=8
set shiftwidth=8
set noexpandtab
set wrap
set smarttab
set textwidth=78

" use filetype plugins and indenting
filetype plugin on
filetype indent on

" cscope
if has("cscope")
	set csprg=/usr/local/bin/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
	set csverb
endi

" Other scripts I want
source ~/.vim/minibufexpl.vim
source ~/.vim/taglist.vim

" xterm things
let &t_Sf=nr2char(27).'[3%p1%dm'
let &t_Sb=nr2char(27).'[4%p1%dm'
