+" Vimrc file for Christian Andersen, http://phuzz.org
+" Heavily modified by Robert Iannucci, http://www.rail.com
+" Stolen with pride by Peter Iannucci
+
+set nocompatible " use vim defaults
+set ls=2 " allways show status line
+set tabstop=4 " numbers of spaces of tab character
+set expandtab " Expand tabs to spaces
+set shiftwidth=4 " numbers of spaces to (auto)indent
+set scrolloff=3 " keep 3 lines when scrolling
+set showcmd " display incomplete commands
+set hlsearch " highlight searches
+set incsearch " do incremental searching
+set ruler " show the cursor position all the time
+set visualbell t_vb= " turn off error beep/flash
+set novisualbell " turn off visual bell
+set number " show line numbers
+set ignorecase " ignore case when searching
+set timeoutlen=200 " set faster timeout
+set title " show title in console title bar
+set ttyfast " smoother changes
+set modeline " last lines in document sets vim mode
+set modelines=3 " number lines checked for modelines
+set shortmess=atI " Abbreviate messages
+set nostartofline " don't jump to first character when paging
+set whichwrap=b,s,<,>,[,] " move freely between files
+let c_space_errors = 1
+
+set sm " show matching braces, somewhat annoying...
+set nowrap " don't wrap lines
+
+syntax on " syntax highlighing
+
+colorscheme elflord " use this color scheme
+set background=dark " adapt colors for background
+
+if has("autocmd")
+ " Restore cursor position
+ au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
+
+ " Filetypes (au = autocmd)
+ au FileType helpfile set nonumber " no line numbers when viewing help
+ au FileType helpfile nnoremap <buffer><cr> <c-]> " Enter selects subject
+ au FileType helpfile nnoremap <buffer><bs> <c-T> " Backspace to go back
+
+ au FileType cpp set nofoldenable
+ au FileType cpp set foldcolumn=0
+ au FileType cpp set cindent
+ au FileType cpp set smartindent
+ au FileType cpp set autoindent
+ au FileType c set nofoldenable
+ au FileType c set foldcolumn=0
+ au FileType c set cindent
+ au FileType c set smartindent
+ au FileType c set autoindent
+ au FileType java set nofoldenable
+ au FileType java set foldcolumn=0
+ au FileType python set foldmethod=syntax
+ au FileType python set foldcolumn=0
+ au FileType python set nocindent
+ au FileType python set nosmartindent
+ au FileType python set noautoindent
+
+ " File formats
+ autocmd BufRead *.py inoremap # X<c-h>#
+endif
+
+" Keyboard mappings
+map <silent> <C-N> :silent noh<CR> " turn off highlighted search
+
+set bs=2
+
+au FileType make setlocal noexpandtab " Turn off expandtabs for Makefiles so they don't get screwed up
+set softtabstop=4 " makes the spaces feel like real tabs
+
+set wildmenu
+
+"set term=linux
+nmap X :bn<cr>
+nmap Z :bp<cr>
+
+nnoremap \ <C-^>
+
+function! FancyRedraw ()
+ if &diff
+ diffupdate
+ else
+ redraw
+ endif
+endfunction
+
+nmap <silent> <C-L> :call FancyRedraw()<CR>