diff options
author | ache <ache@ache.one> | 2017-07-16 22:38:46 +0000 |
---|---|---|
committer | ache <ache@ache.one> | 2017-07-16 22:40:12 +0000 |
commit | 00b09e1cf5f773e74f78895fc8eb9ccd61c32dc4 (patch) | |
tree | 2752d6194cedf429b74d4cc2ace2bcc70b3a4749 /plugin | |
parent | Add svg support (diff) |
Make commands
Diffstat (limited to 'plugin')
-rwxr-xr-x | plugin/perso.vim | 25 |
1 files changed, 24 insertions, 1 deletions
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<CR> :map <F5> :setlocal spell! spelllang=fr<CR> :map <F6> :setlocal spell! spelllang=en_us<CR> -:map <F9> :make<CR> +:map <F9> :make<CR>:copen<CR><CR> + +noremap <silent> [q :copen<CR> +noremap <silent> ]q :cclose<CR> +noremap <silent> [Q :cfirst<CR> +noremap <silent> ]Q :clast<CR> +noremap <silent> [[ :cprev<CR> +noremap <silent> ]] :cnext<CR> + +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 <silent> zv :!markdown % \| w3m -I utf-8 -T text/html |