set showcmd set backspace=indent,eol,start set clipboard=unnamed set ruler set t_Co=256 "map j j "map k k "map h h "map l l filetype plugin indent on " Color : autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkred guibg=darkred colo jellybeans set cursorline hi CursorLine term=bold cterm=bold ctermbg=black match ExtraWhitespace /\s\+$/ " Completion related options " wildcard char = set wildmenu set wildmode=list:longest:full nnoremap :set pastem`o``:set nopaste nnoremap :set pastem`O``:set nopaste inoremap A inoremap 0i "Perso C définition" inoremap prt printf inoremap swf printf inoremap #in< #include <> inoremap #in" #include "" inoremap #def #define inoremap #un #undef inoremap #ifn #ifndef inoremap #ifd #ifdef inoremap #std #include inoremap #io #include inoremap #main int main(void) {}A inoremap ##main int main(int argc, char* argv[]) {}A " Personal shortcurts ca tn tabnew ca tc tabc map :setlocal spell! spelllang=fr map :setlocal spell! spelllang=en_us inoremap =strftime('%F') inoremap =strftime('%c') " Personal compil shortcurts map :make:cw noremap [q :copen noremap ]q :cclose noremap [Q :cfirst noremap ]Q :clast noremap [[ :cprev noremap ]] :cnext "Allow vim clipboad <-> host clipboard to share data set clipboard=unnamed " Quick Comment : autocmd FileType c,cpp,java,go,scala,js let b:comment_leader = '//' autocmd FileType sh,ruby,python let b:comment_leader = '#' autocmd FileType conf,fstab let b:comment_leader = '#' autocmd FileType tex let b:comment_leader = '%' autocmd FileType mail let b:comment_leader = '>' autocmd FileType vim let b:comment_leader = '"' autocmd FileType haskell let b:comment_leader = '--' autocmd FileType c,cpp,java,go,scala set foldmethod=syntax noremap ,cc :silent s/^/=escape(b:comment_leader,'\/')/:nohlsearch noremap ,cu :silent s/^\V=escape(b:comment_leader,'\/')//e:nohlsearch noremap :silent s/^/=escape(b:comment_leader,'\/')/:nohlsearch noremap c :silent s/^\V=escape(b:comment_leader,'\/')//e:nohlsearch nnoremap cd :cd %:p:h nnoremap // :nohls " Compil option autocmd Filetype c call SetCCompiler() function SetCCompiler() if !(filereadable("makefile") || filereadable("Makefile")) set makeprg=gcc\ % endif endfunction autocmd Filetype python call SetPythonCompiler() function SetPythonCompiler() if executable("flake8") set makeprg=flake8\ --ignore=E111,E303,E201,E231,E391,E225,E203,E226,W391\ % endif endfunction noremap zv :!markdown % \| w3m -I utf-8 -T text/html set colorcolumn=80 set cursorcolumn highlight CursorColumn ctermbg=Red set hls set incsearch au BufNewFile *.c 0r ~/.vim/template/skel.c