| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316 | "" Vim configuration file (~/.vimrc)" 2009-2014, kolter <kolter@openics.org>""  This file is distributed in the hope that it will be useful,"  but WITHOUT ANY WARRANTY"" {{{ Load Pluginscall plug#begin('~/.vim/plugged')Plug 'junegunn/indentLine'Plug 'sjl/gundo.vim'Plug 'scrooloose/syntastic'Plug 'majutsushi/tagbar'Plug 'scrooloose/nerdtree'Plug 'bling/vim-airline'Plug 'kien/ctrlp.vim'Plug 'tpope/vim-fugitive'Plug 'airblade/vim-gitgutter'Plug 'gregsexton/gitv'Plug 'terryma/vim-multiple-cursors'Plug 'jlanzarotta/bufexplorer'Plug 'flazz/vim-colorschemes'Plug 'vim-scripts/comments.vim'Plug 'ervandew/supertab'Plug 'rstacruz/sparkup'Plug 'Lokaltog/vim-easymotion'Plug 'editorconfig/editorconfig-vim'Plug 'godlygeek/tabular'Plug 'plasticboy/vim-markdown'Plug 'pearofducks/ansible-vim'Plug 'LaTeX-Box-Team/LaTeX-Box'Plug 'SirVer/ultisnips'Plug 'honza/vim-snippets'Plug 'rkitover/vimpager'Plug 'http://git.openics.org/kolter/vim-bindzone.git'call plug#end()" }}}" {{{ General Settings" Filetypes Settingsif has('autocmd')    filetype plugin indent on    "reload Vim config file after saving    "autocmd BufWritePost $MYVIMRC :source $MYVIMRC    "always limit the width for text files    autocmd BufRead *.txt set tw=78    autocmd QuickFixCmdPre * botright cwindow 5endif"Term settings (under tmux)if &term =~ '^screen'    "tmux will send xterm-style keys when its xterm-keys option is on    execute "set <xUp>=\e[1;*A"    execute "set <xDown>=\e[1;*B"    execute "set <xRight>=\e[1;*C"    execute "set <xLeft>=\e[1;*D"endifset nocompatible "no vi compatibilityset history=1000 "command history sizeset undolevels=120 "undo levels countset autoread "notify file changesset autochdir "switch to the current file directoryset clipboard+=unnamed "share system clipboardset backup "enable backupsset backupdir=~/.vim/backups "backup directoryset directory=~/.vim/tmp "directory to place swap files in"Encoding settingsif has("multi_byte")    if &termencoding == ""        let &termencoding = &encoding    endif    set encoding=utf-8    setglobal fileencoding=utf-8    set fileencodings=utf-8,default,latin1,ucs-bomendif"Syntax highlightsyntax onset t_Co=256set bg=darkcolorscheme grb256" }}}" {{{ Interface Settingsset title "show titleset number "show line numbersset ruler "statusline for each windowset visualbell t_vb= "visual beepset showcmd "show incomplete commandsset confirm "raise a dialog asking what to do instead of failing"set mouse=a "enable mouse supportset lazyredraw "do not redraw when running macrosset ttyfast "fast terminal connection supportset ttimeoutset ttimeoutlen=100set scrolloff=999set sidescrolloff=5set shortmess=a "abbreviations on status lineset laststatus=2 "always statuslineset wildmenu "display completion menuset wildmode=list:longest,list:full "content of completion menu"ignore some extensions while completing filename"set wildignore=*.o,*.so,,*.gz,*.bz2,*.tar,*.tgz,*.tbz2,*.png,*.jpg,*.jpeg,*.gifset wildchar=<TAB> "wildcar expansion characterset modeline "allow last lines of documents set vim modeset modelines=3 "number of lines to check for modelines" }}}" {{{ Keyboard Settings" fix home and end keys with some terminalsif $TERM =~ '^screen-256color'    map <Esc>OH <Home>    map! <Esc>OH <Home>    map <Esc>OF <End>    map! <Esc>OF <End>endif" keep ctrl-a/ctrl-e for begining/end of linenmap <c-a> <c-o>Iimap <c-a> <c-o>Ivmap <c-a> <c-o>Inmap <c-e> <c-o>Aimap <c-e> <c-o>Avmap <c-e> <c-o>A"reopen current filemap <F5> :e!<cr>"using redraw to disable highlighted search patternsnnoremap <c-L> :nohl<cr><c-L>"map F1 to open previous buffernmap <F1> :bp<cr>imap <F1> <ESC>:bp<cr>a"map F2 to open next buffernmap <F2> :bn<cr>imap <F2> <ESC>:bn<cr>aimap <c-@> <c-x><c-o>nmap <c-s-left> :tabprevious<cr>nmap <c-s-right> :tabnext<cr>nmap <c-s-up> :tabnew<cr>nmap <c-s-down> :tabclose<cr>nmap <c-d> :bw<cr>nmap <F6> :vsplit<cr>nmap <F7> :split<cr>"ctrl-$arrow to cycle around splitted windowsmap <c-left> <c-w>hmap <c-right> <c-w>lmap <c-Up> <c-w>kmap <c-Down> <c-w>j"ident in visual mode keep selectionvmap > >gvvmap < <gv" }}}" {{{ Editor Settingsset fileformats=unix,dos,mac "support all three, in this orderset hidden "make possible to change buffer without savingset report=0 "agressive reportingset pastetoggle=<F11> "use <F11> to toggle between 'paste' and 'nopaste'set nostartofline "leave the cursor where it is"indent settingsset autoindentset backspace=indent,eol,start "enhance backspacingset smartindentset cindentset smarttab"tabs and spaces settingsset expandtab "tab are spacesset tabstop=4set shiftwidth=4set shiftround "round indent to shiftwidthset softtabstop=4set showmatch "brace/parenthese/bracket matchingset nowrap "wrap long linesif has("multi_byte")    set showbreak="…"else    set showbreak="+++"endif"show some not printable charsset listif has("multi_byte")    set listchars=trail:·,extends:>,precedes:<,nbsp:•,tab:▷\⋅else    set listchars=tab:>.,trail:·,extends:>,precedes:<,nbsp:%endif"search settingsset hlsearch "highlight searchesset incsearch "incremental searchesset ignorecase "ignore case in search patternsset infercase "smart case support" }}}" {{{ Code foldingset foldmethod=indent   "fold based on indentset nofoldenable        "dont fold by defaultset foldlevel=0" }}}" {{{ Email Settingsif has('autocmd')    autocmd BufRead ~/.mutt/tmp/mutt-* set filetype=mail    autocmd FileType mail set autoindent expandtab nocindent formatoptions=tcqn    autocmd FileType mail vmap D dO[...]<CR>    autocmd FileType mail call EnableSpellChecking()endif" }}}" {{{ Spell Checking"set spellfile=~/.vim/spell/wordsfunction! EnableSpellChecking()    setlocal spell spelllang=fr,en_us    let b:spell = 1endfunctionfunction! DisableSpellChecking()    setlocal nospell    unlet b:spellendfunctionfunction! ToggleSpell()    if !exists("b:spell")        execute 'call EnableSpellChecking()'    else        execute 'call DisableSpellChecking()'    endifendfunctionnmap <F4> :call ToggleSpell()<CR>imap <F4> <Esc>:call ToggleSpell()<CR>a" }}}" {{{ Gundo extension Setup" Gundo sidebar on the rightlet g:gundo_right = 1" Gundo layoutlet g:gundo_width = 60let g:gundo_preview_height = 40" Gundo status lineslet g:gundo_tree_statusline = "Gundo"let g:gundo_preview_statusline = "Gundo Preview"" Preview pane below the bufferlet g:gundo_preview_bottom = 1" Close Gundo panes on revertlet g:gundo_close_on_revert = 1" F3 key to show/hide Gundo sidebarnnoremap <F3> :GundoToggle<CR>" }}}" {{{ Syntastic extension Setup" automatically open/close pane when errors (or not)let g:syntastic_auto_loc_list = 1" Redefine errors/warning symbols on sidebarlet g:syntastic_error_symbol = 'EE'let g:syntastic_style_error_symbol = 'ee'let g:syntastic_warning_symbol = 'WW'let g:syntastic_style_warning_symbol = 'Ws'" redefine default python linter"let g:syntastic_python_checker = 'pylint'" add options to python linter"let g:syntastic_python_checker_args = ''" }}}" {{{ ctrlp extension Setup" Change default keylet g:ctrlp_map = '<c-o>'" Match window heightlet g:ctrlp_max_height = 20" Add a key to search in opened buffersmap <c-b> :CtrlPBuffer<cr>" }}}" {{{ airline extension setuplet g:airline_powerline_fonts=1let g:airline#extensions#tabline#enabled=1" }}}" {{{ tagbar extension setupnmap <F8> :TagbarToggle<CR>" }}}" {{{ Latex settingslet g:tex_conceal = ""let g:LatexBox_Folding = 1let g:UltiSnipsExpandTrigger="<tab>"let g:UltiSnipsJumpForwardTrigger="<tab>"let g:UltiSnipsJumpBackwardTrigger="<s-tab>"if has('autocmd')    autocmd FileType tex set foldlevel=0 foldenableendif" }}}" vim: foldmethod=marker foldlevel=0 foldenable
 |