"TODO guicursor set cmdheight=1 set encoding=utf-8 set termencoding=utf-8 set clipboard=unnamed if (&term =~ "-256color") set t_Co=256 endif if has('gui_running') set guioptions+=a set guioptions+=c set guioptions-=T set guioptions-=e set columns=132 set lines=60 if has('win32') set guifont=Bitstream_Vera_Sans_Mono:h8:cANSI else set guifont=Bitstream\ Vera\ Sans\ Mono\ 8 endif else if (&term == 'screen.linux') || (&term =~ '^linux') set t_Co=8 elseif (&term == 'rxvt-unicode') || (&term =~ '^xterm') || (&term =~ '^screen-256') set mouse=a set ttymouse=xterm endif endif colorscheme desert256 syntax on filetype indent plugin on set modelines=5 set showcmd set showmode set printoptions=paper:letter,header:0 set shell=/bin/sh set shellpipe=2>&1\|tee set showbreak=+++ set splitbelow "will recurse backwards until 'tags' is found set tags+=tags; set autowrite set writebackup set backup set backupdir=$HOME/.vim/backup/,/tmp set directory=$HOME/.vim/backup/,/tmp "status line settings set laststatus=2 function! GetIndent() if (&et == 1) return 'spc' else return 'tab' endif endfunction set statusline=%-3.3n\ %f\ %r%#Error#%m%#Statusline#\ (%l/%L,\ %c)\ %P%=%h%w\ %y\ [%{GetIndent()}]\ [%{&encoding}:%{&fileformat}]\ \ "bell options (go away, I hate you) set vb set t_vb= " search options set hlsearch set incsearch set ignorecase set smartcase "navigation options set whichwrap=h,l,<,>,[,] set backspace=indent,eol,start set tabstop=4 set softtabstop=4 set shiftwidth=4 set textwidth=80 set expandtab set nowrap set history=500 set cinoptions=g0,:0,l1,(0,t0 set formatoptions+=l set selection=inclusive set number set hidden set scrolloff=5 "{{{ Folding test if has("folding") set foldenable set foldmethod=marker set foldmarker={{{,}}} set foldcolumn=0 set foldlevel=100 endif "}}} set shortmess=atI set complete=.,t,i,b,w,k set wildchar= set wildmenu set wildmode=longest:full,full set wildignore+=*~,*.o,*.tmp set previewheight=5 let mapleader = "`" let &cdpath=','.expand("$HOME") if has("autocmd") " This needs to be done after everything (plugins and all) are loaded "au VimEnter * GuiColorScheme kib_darktango au Syntax {cpp,c,idl} runtime syntax/doxygen.vim au Syntax {cpp,c,lisp,scheme} runtime plugin/RainbowParenthesis.vim au FileType qf if &buftype == "quickfix" | \ setlocal statusline=%-3.3n\ %0*[quickfix]%=%2*\ %<%P | \endif au FileType mail setlocal spell au FileType cvs setlocal spell au FileType git setlocal spell au FileType help setlocal statusline=%-3.3n\ [help]%=\ %<%P au WinEnter * setlocal cursorline au WinLeave * setlocal nocursorline au BufReadPost * if line("'\"")>0 && line("'\"")<=line("$")|exe "normal g`\""|endif "if num(tabs) > num(spaces), set noet au BufReadPost * if len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^\\t"')) > len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^ "'))|set noet|endif au BufRead,BufNewFile PKGBUILD set ft=bash "Omni Functionalizationify au FileType css setlocal ofu=csscomplete#CompleteCSS au Filetype * if exists('&ofu') && &ofu == "" | \ set ofu=syntaxcomplete#Complete | \endif highlight ExtraWhitespace ctermbg=red guibg=red autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+$\| \+\ze\t/ endif if v:version >= 700 set cursorline set completeopt=menu,menuone,longest,preview set spelllang=en_us set spellsuggest=fast,20 set numberwidth=1 " imma commnt with missspellings, use me tu tesst endif if v:version >= 600 set autoread endif "ha! defeated! nmap q: :q " man-page autoreturn after view nmap K K "tags files search for a project " :FindTags('~/projects/something') command! -nargs=1 -complete=dir FindTags :call ProjectTags() function! ProjectTags(projectbase) let tfiles = glob("$(find ".a:projectbase." -name tags -print)") let &tags = substitute(tfiles, "\n", ",", "g") endfunction command! -nargs=* Make :call SilentMake() function! SilentMake() let oldsp=&shellpipe setlocal shellpipe=>%s\ 2>&1 exe 'silent make '.string(a:000) cwindow set shellpipe=&oldsp redraw! "this screws up the screen sometimes, fix that endfunction command! -bar -nargs=* -bang W :w command! -bar -nargs=* -bang Q :q command! -bar -nargs=* -bang Wq :wq command! -bar -nargs=0 SudoW :silent exe "write !sudo tee % >/dev/null"|silent edit! iab MAINTTAG Maintainer: Aaron Griffin "Modelines inoremap ^ =substitute(&commentstring,' \=%s\>'," -*- ".&ft." -*- vim:set ft=".&ft." ".(&et?"et":"noet")." sw=".&sw." sts=".&sts.':','') "screw you thinkpad imap "TagList "let Tlist_Display_Tag_Scope = 1 "ugh... let g:Tlist_Display_Prototype = 1 let g:Tlist_Use_Right_Window = 1 let g:Tlist_Exit_OnlyWindow = 1 let g:Tlist_Enable_Fold_Column = 0 let g:Tlist_Sort_Type = "name" let g:Tlist_Compact_Format = 0 let g:Tlist_File_Fold_Auto_Close = 0 let g:Tlist_WinWidth = 50 "NetRW let g:netrw_keepdir = 1 let g:netrw_winsize = 40 let g:netrw_alto = 1 "Lisp syntax let g:lisp_rainbow = 1 "NERDTree let g:NERDChristmasTree = 1 let g:NERDTreeiHijackNetrw = 1 "FuzzyFinder - TODO "let g:FuzzyFinderOptions.Base.key_next_mode = '' "let g:FuzzyFinderOptions.Base.key_prev_mode = '' "let g:FuzzyFinderOptions.Base.info_file = '' "{{{ Mappings function MapAllModes(key, cmd) let str = a:cmd."" exec 'noremap '.a:key.' '.str exec 'noremap! '.a:key." \".str endfunction function MapToggle(key, opt) call MapAllModes(a:key, ':set '.a:opt.'!') endfunction command -nargs=+ MapAllModes call MapAllModes() command -nargs=+ MapToggle call MapToggle() MapAllModes :Tlist MapAllModes :VSBufExplorer MapAllModes :NERDTreeToggle MapAllModes :nohlsearch MapToggle paste MapToggle spell MapAllModes :normal\ zA MapToggle wrap "}}} " -*- vim -*- vim:set ft=vim et sw=4 sts=4: