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 set encoding=utf-8 set fileencoding=utf-8 hi CursorLine term=bold cterm=bold ctermbg=black filetype plugin indent on nnoremap :set pastem`o``:set nopaste nnoremap :set pastem`O``:set nopaste inoremap A inoremap 0i "inoremap { {}$ "inoremap {{ { "inoremap {} {} "inoremap << <> "inoremap [ [] "inoremap [[ [ "inoremap [] [] "inoremap ( () "inoremap (( ( "inoremap () () "inoremap " "" "inoremap "" "" "inoremap ' '' "inoremap '' '' "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 " Copy clip nnoremap èè__ :set pastemn"+p'n:set nopaste " Select clip nnoremap èèè_ :set pastemn"*p'n:set nopaste nmap :TagbarToggle ca tn tabnew ca tc tabc "Allow vim clipboad <-> host clipboard to share data set clipboard=unnamed " Quick Comment : autocmd FileType c,cpp,java,go,scala 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 = '--' 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 map :setlocal spell! spelllang=fr map :setlocal spell! spelllang=en_us inoremap =strftime('%F') inoremap =strftime('%c') map :make:cw noremap [q :copen noremap ]q :cclose noremap [Q :cfirst noremap ]Q :clast noremap [[ :cprev noremap ]] :cnext 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