X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=vimrc;h=636b68aefafef55e5057924db8035ad841bdb784;hb=HEAD;hp=c849db919803db1c650dab95e6c7dec5a5fee58b;hpb=5923f706617b966f114656c78bd60108d4ab1dde;p=~madcoder%2Fdotfiles.git diff --git a/vimrc b/vimrc index c849db9..636b68a 100644 --- a/vimrc +++ b/vimrc @@ -34,7 +34,7 @@ set report=0 " show a report when N lines were changed. set laststatus=2 " show status line? Yes, always! set noruler " show cursor position? Yep! -set statusline=[\ %f%m\ %r%y\ %=\ hex:%B\ \ %l,%c%V\ \ %P\ ] +set statusline=[\ %f%m\ %r%y\ %{fugitive#statusline()}\ %=\ hex:%B\ \ %l,%c%V\ \ %P\ ] set shiftwidth=4 " Number of spaces to use for each insertion of " (auto)indent. @@ -53,11 +53,15 @@ set softtabstop=4 " sts set expandtab " expand tabs set notextmode " no - I am using Vim on UNIX! set textwidth=0 " Don't wrap words by default +set cc=+1 set title " Permet de voir le tit. du doc. crt. ds les XTERM set viminfo='1000,/1000,:1000,<1000,@1000,n~/.viminfo set history=1000 " What info to store from an editing session " in the viminfo file; can be used at next session. +set undofile +set undodir=~/.cache/vim/ +au BufWritePre /tmp/* setlocal noundofile set sessionoptions=buffers,folds,localoptions,options,tabpages,help set ignorecase " Do case insensitive matching @@ -88,19 +92,18 @@ set complete-=k complete+=k set tags=tags;/,.tags;/,TAGS;/ set cinoptions= +set cinoptions+=Ls " align labels at 0 shiftwidth +set cinoptions+=:0,=1s " same for case labels +"set cinoptions+=g0.5s,h0.5s " same for c++ stuff set cinoptions+=t0 " type on the line before the functions is not idented -set cinoptions+=:2,=2 " indent case ...: of 2 from the switch { set cinoptions+=(0,Ws " indent in functions ( ... ) when it breaks -set cinoptions+=g2,h2 " indent C++ scope of 2, and the members from 2 from it set cinoptions+=m1 " aligh the closing ) properly -"set cinoptions+=l1 " align closing brace with the case -"set cinoptions+=b1 " align break; with case ...: +set cinoptions+=j1 " java/javscript -> fixes blocks +"set cinoptions+=l0.5s " align code after label ignoring braces. set diffopt=filler,context:5,iwhite set fillchars+=diff:\ ,vert:│ -set makeprg=LC_ALL=C\ make\ M=1 - exe "set path=." . system("echo | cpp -v 2>&1 | grep '^ .*/include' | tr -d \"\n\" | tr \" \" \",\"") set path+=.;/ @@ -137,8 +140,12 @@ map g :bo cw 8 " {{{ Mappings " {{{ Tab Key magic ... -vmap >gv -vmap >gv +xnoremap >gv +snoremap >gv +vnoremap =TabAlign() " }}} -map + :cn -map - :cp -map :cn -map :cp +map + :cnext +map - :cprevious +map :cnext +map :cprevious map Q gq @@ -194,10 +201,6 @@ inoremap mzviwU`z noremap :set ai!:set ai? inoremap a -noremap :bp -inoremap :bp -noremap :bn -inoremap :bn noremap :make!:bo cw 8 inoremap :make!:bo cw 8 noremap :make clean @@ -210,6 +213,8 @@ if has("autocmd") filetype plugin indent on syntax on + au Syntax {cpp,c,javascript} runtime syntax/doxygen.vim + au BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | @@ -219,12 +224,13 @@ if has("autocmd") au FileType debchangelog normal zO + au FileType asciidoc setlocal tw=78 noet ts=8 sw=8 au FileType javascript setlocal cindent tw=78 iskeyword+=$ au FileType actionscript setlocal cindent tw=78 iskeyword+=$ noignorecase ff=dos au FileType mail setlocal noet iskeyword+=- tw=72 au FileType haxe setlocal tw=78 noignorecase cin ai - au FileType c,cpp setlocal tw=78 noignorecase "fo-=ro + au FileType d,c,cpp setlocal tw=78 noignorecase "fo-=ro au FileType ocaml,acute,omlet setlocal sw=2 sts=2 tw=78 au FileType php setlocal et fo+=ro tw=78 indentexpr= cin au FileType python setlocal foldmethod=indent foldnestmax=1 @@ -244,7 +250,7 @@ if has("autocmd") let ocaml_noindent_let=1 let git_diff_spawn_mode=2 - let git_diff_opts = "--patience -C -C -M -B" + let git_diff_opts = "--no-renames --summary -C -M" let c_gnu=1 let c_space_errors=1 let c_no_curly_error=1 @@ -363,31 +369,32 @@ if has("gui_running") || &t_Co >= 88 exec myhi("Normal", "none", "dfdfdf", "NONE") exec myhi("MoreMsg", "none", "dfdfdf", "NONE") endif - exec myhi("Comment", "none", "afafff", "0f0f2f") - exec myhi("Folded", "none", "afafff", "0f0f2f") + exec myhi("ColorColumn", "none", "NONE", "0f0f0f") + exec myhi("Comment", "none", "afafff", "0f0f0f") + exec myhi("Folded", "none", "afafff", "0f0f0f") - exec myhi("SpecialKey", "none", "dfdfdf", "0f0f2f") - exec myhi("Todo", "underline", "yellow", "333333") + exec myhi("SpecialKey", "none", "dfdfdf", "0f0f0f") + exec myhi("Todo", "underline", "yellow", "2f2f2f") exec myhi("Error", "bold", "white", "red") - exec myhi("Function", "none", "4fcfcf", "NONE") - exec myhi("Identifier", "none", "4fcfcf", "NONE") + exec myhi("Function", "none", "4fdfdf", "NONE") + exec myhi("Identifier", "none", "4fdfdf", "NONE") exec myhi("Cursor", "reverse", "dfdfdf", "black") - exec myhi("Visual", "none", "NONE", "333333") + exec myhi("Visual", "none", "NONE", "2f2f2f") exec myhi("IncSearch", "none", "black", "yellow") exec myhi("Search", "none", "black", "yellow") - exec myhi("StatusLine", "none", "yellow", "333333") + exec myhi("StatusLine", "none", "yellow", "2f2f2f") exec myhi("StatusLineNc", "none", "dfdfdf", "1c1c1c") - exec myhi("WildMenu", "none", "white", "0f0f2f") - exec myhi("VertSplit", "none", "darkgray", "0f0f2f") + exec myhi("WildMenu", "none", "white", "0f0f0f") + exec myhi("VertSplit", "none", "darkgray", "0f0f0f") exec myhi("NonText", "none", "darkgray", "NONE") - exec myhi("MatchParen", "none", "white", "0f0f2f") - exec myhi("Pmenu", "none", "dfdfdf", "0f0f2f") + exec myhi("MatchParen", "none", "white", "0f0f0f") + exec myhi("Pmenu", "none", "dfdfdf", "0f0f0f") exec myhi("PmenuSel", "none", "white", "3f3f7f") - exec myhi("PmenuSbar", "none", "white", "0f0f2f") + exec myhi("PmenuSbar", "none", "white", "0f0f0f") exec myhi("PmenuThumb", "none", "3f3f7f", "3f3f7f") exec myhi("SpellBad", "none", "NONE", "800000") @@ -400,10 +407,10 @@ if has("gui_running") || &t_Co >= 88 exec myhi("Repeat", "none", "bf7f00", "NONE") exec myhi("Statement", "none", "bf7f00", "NONE") - exec myhi("StorageClass", "none", "3fbf3f", "NONE") - exec myhi("Type", "none", "3fbf3f", "NONE") - exec myhi("Structure", "none", "3fbf3f", "NONE") - exec myhi("Directory", "none", "3fbf3f", "NONE") + exec myhi("StorageClass", "none", "20b020", "NONE") + exec myhi("Type", "none", "20b020", "NONE") + exec myhi("Structure", "none", "20b020", "NONE") + exec myhi("Directory", "none", "20b020", "NONE") exec myhi("Include", "none", "bf0fbf", "NONE") exec myhi("PreProc", "none", "bf0fbf", "NONE") @@ -423,6 +430,24 @@ if has("gui_running") || &t_Co >= 88 " C exec myhi("cFunction", "none", "b0b0b0", "NONE") + + " Doxygen + if !exists(':SynLink') + command -nargs=+ SynLink hi def link + endif + SynLink doxygenSpecialTypeOnelineDesc doxygenBrief + SynLink doxygenSpecialOnelineDesc doxygenBrief + SynLink doxygenSpecialHeading doxygenBrief + SynLink doxygenParamDirection doxygenSpecial + + exec myhi("javaScriptTpl", "none", "7fcf7f", "none") + exec myhi("javaScriptTplMark","none", "b218b2", "none") + exec myhi("doxygenComment", "none", "6060ff", "0f0f0f") + exec myhi("doxygenBrief", "none", "6060ff", "0f0f0f") + exec myhi("doxygenPrev", "none", "6060ff", "0f0f0f") + exec myhi("doxygenParam", "none", "6060ff", "0f0f0f") + exec myhi("doxygenSpecial", "none", "6060ff", "0f0f0f") + exec myhi("doxygenParamName", "underline", "6060ff", "0f0f0f") else hi Comment cterm=none ctermfg=blue ctermbg=none hi Folded cterm=none ctermfg=brown ctermbg=none @@ -453,4 +478,13 @@ endif hi def link htmlTag htmlStatement hi def link htmlEndTag htmlStatement +ia sabine Sabine " }}} + +call pathogen#infect() +let g:clang_complete_copen=1 +let g:clang_snippets=1 +let g:clang_complete_patterns=1 +let g:clang_snippets_engine = 'clang_complete' +set completeopt=menu,longest +set concealcursor=inv