From 00b09e1cf5f773e74f78895fc8eb9ccd61c32dc4 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 16 Jul 2017 22:38:46 +0000 Subject: Make commands --- plugin/perso.vim | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/perso.vim b/plugin/perso.vim index fbfd8c4..b229f54 100755 --- a/plugin/perso.vim +++ b/plugin/perso.vim @@ -104,7 +104,30 @@ nnoremap cd :cd %:p:h :map :setlocal spell! spelllang=fr :map :setlocal spell! spelllang=en_us -:map :make +:map :make:copen + +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 -- cgit v1.2.3