" We use a vim source /etc/vimrc set nu set nocompatible " " Colo(u)red or not colo(u)red " If you want color you should set this to true " let color = "true" " if has("syntax") if color == "true" " This will switch colors ON so ${VIMRUNTIME}/syntax/syntax.vim else " this switches colors OFF syntax off set t_Co=0 endif endif if has('gui_running') set t_Co=256 endif if &t_Co != 256 hi Folded guifg=yellow guibg=NONE ctermfg=yellow ctermbg=NONE hi Search ctermfg=white ctermbg=red guifg=white guibg=Red hi Folded guifg=orange guibg=black hi SpellBad ctermbg=yellow endif filetype plugin indent on filetype plugin on "set cindent set shiftwidth=4 set smartindent set foldmethod=syntax " Disable spelling checks for the preview window func PreviewSpell() if &previewwindow set nospell endif if bufname('%') == '-MiniBufExplorer-' || bufname('%') == 'TreeExplorer' || bufname('%') == '__Tag_List__' || bufname('%') == '' set nospell endif endfun fun AddCppSyntax() syn match cppSTD "\-,trail:- set viminfo='1000,<1000,:1000,@1000,/1000,f1 set ignorecase smartcase set path+=~/include set path+=./include set path+=libs set path+=./libs set path+=../libs set path+=. set path+=.. set path+=../ set path+=./../include set path+=externals set path+=./externals set path+=../externals set path+=externals/INCLUDE set path+=./externals/INCLUDE set path+=../externals/INCLUDE set path+=externals/LIBRARY set path+=./externals/LIBRARY set path+=../externals/LIBRARY set path+=../../externals set path+=../../externals/INCLUDE set path+=../../externals/LIBRARY set path+=../../INCLUDE set path+=../../LIBRARY set path+=../INCLUDE set path+=../LIBRARY set tags+=~/.vim/systags set infercase set so=2 set autoindent set ai set si set smarttab set foldopen+=search set completeopt=menu,menuone,longest,preview set ruler set spellsuggest=10 set wim=longest:full set wildmenu set visualbell set ts=8 set title "set titleold="..." set hidden set shortmess=atIoOT set shiftround set wildignore=.svn,CVS,.git,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif " set inex as a workaround for vim not correctly searching for files that " consist of a multiple level path "set inex=substitute(v:fname,'^','../','g') command DiffOrig let ftype=&filetype | vert new | set bt=nofile |call setbufvar('%','&filetype',ftype)| r # | 0d_ | diffthis | wincmd p | diffthis command DO DiffOrig command RELOAD bfirst | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e | bnext | :e let perl_extended_vars=1 let php_extended_vars=1 let g:patchreview_tmpdir="/tmp" if &t_Co == 256 let g:inkpot_black_background = 1 " colo my_inkpot colo my_out endif let Tlist_Exit_OnlyWindow=1 let Tlist_Inc_WinWidth=0 let treeExplVertical=1 let OmniCpp_ShowScopeInAbbr = 1 let OmniCpp_ShowPrototypeInAbbr = 1 let OmniCpp_GlobalScopeSearch = 0 let OmniCpp_NamespaceSearch = 2 let OmniCpp_SelectFirstItem = 2 let OmniCpp_LocalSearchDecl = 1 let OmniCpp_MayCompleteDot = 0 let OmniCpp_MayCompleteArrow = 0 let g:SuperTabDefaultCompletionType = 'context' let g:SuperTabMappingForward = '¬' let g:SuperTabMappingTabLiteral = '' autocmd CursorMovedI * if pumvisible() == 0|pclose|endif autocmd InsertLeave * if pumvisible() == 0|pclose|endif let g:miniBufExplMapWindowNavVim = 0 let g:miniBufExplMapWindowNavArrows = 1 let g:miniBufExplMapCTabSwitchBufs = 1 let g:miniBufExplModSelTarget = 1 let g:miniBufExplorerAutoUpdate = 1 let g:miniBufExplVSplit = 30 " column width in chars map :TMiniBufExplorer nmap bi /*ea*/ "nmap OHi// nmap :TC vmap :TC nmap dx d/\ze[A-Z_] :nohl nmap :nohl :redraw! set autoread au InsertEnter * checktime "set fileencodings=latin9,ucs-bom,utf-8,default,latin1 "let g:miniBufExplorerDebugMode = 2 " Errors will show up in "let g:miniBufExplorerDebugLevel = 10 " MBE reports everything let g:miniBufExplorerMoreThanOne = 4 let g:miniBufExplForceSyntaxEnable = 0 "map :tabp map :tabnew map :cp map :cn nnoremap :VSTreeExplore nnoremap :TlistToggle map :!ctags -R --links=no --c++-kinds=+p --fields=+iaS --extra=+q --languages=c++ --exclude=externals/boost . au FileType qf set nospell au FileType dot set nospell au FileType cpp set spell func OpenFullQuicklist() for x in getqflist() " echo x.bufnr " echo x.lnum " echo x.col " echo x.vcol " echo x.nr " echo x.pattern " echo x.text " echo x.type " echo x.valid if( x.valid == 1) :copen break endif endfor " sleep 10 endfun set spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ let g:DoxygenToolkit_briefTag_pre="" let g:DoxygenToolkit_returnTag="@returns " let g:DoxygenToolkit_compactDoc="yes" au QuickFixCmdPost make call OpenFullQuicklist() command Make :make -j 16 CC=distcc CXX="distcc g++" "map :call ToggleBufferExplorer() map :FilesystemExplorer map r let SVNAutoCommitDiff='1' "let SVNCommandSplit='vertical' "let SVNCommandDiffSplit='vertical' let SVNCommandEnableBufferSetup='1' let SVNCommandEdit='split' let SVNCommandNameResultBuffers='1' func Ocsearch(sval) " :let @/ = a:0 :let @/ = a:sval :normal! /a:sval :normal! n :Occur endfun nnoremap * :call histadd("/",'\<'.expand("").'\>'):let @/=histget("/",-1):se hlsearch command -nargs=1 Oc call Ocsearch('') map :execute "noautocmd vimgrep /" . expand("") . "/j " . expand("*.c *.cc *.cxx *.cpp *.h *.hpp") cw map :execute "Grep " . expand("") . " *.c *.cc *.cxx *.cpp *.h *.hpp" cw set laststatus=1 function! InsertStatuslineColor(mode) if a:mode == 'i' hi StatusLine term=bold,reverse cterm=bold ctermfg=237 ctermbg=157 gui=bold guifg=#3a3a3a guibg=#afffaf elseif a:mode == 'r' hi statusline guibg=blue hi StatusLine term=bold,reverse cterm=bold ctermfg=237 ctermbg=153 gui=bold guifg=#3a3a3a guibg=#afafff else hi statusline guibg=red hi StatusLine term=bold,reverse cterm=bold ctermfg=237 ctermbg=223 gui=bold guifg=#3a3a3a guibg=#ffafaf endif endfunction " au InsertEnter * call InsertStatuslineColor(v:insertmode) au InsertLeave * hi StatusLine term=bold,reverse cterm=bold ctermfg=237 ctermbg=15 gui=bold guifg=#3a3a3a guibg=#ffffff hi StatusLine term=bold,reverse cterm=bold ctermfg=237 ctermbg=15 gui=bold guifg=#3a3a3a guibg=#ffffff " ~/.vimrc ends here