From 9b4e8b9f7b20247ebfeae7d7b9d077549b5915ea Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 28 Sep 2018 12:20:07 +0200 Subject: [PATCH] Dont call mars if not installedDont call mars if not installedDont call mars if not installedDont call mars if not installedDont call mars if not installedDont call mars if not installedDont call mars if not installed --- init.vim | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/init.vim b/init.vim index 97babaf..24db8e5 100644 --- a/init.vim +++ b/init.vim @@ -57,10 +57,18 @@ set list set listchars=tab:  ,trail:·,extends:>,precedes:<,nbsp:¬ " Remove trailing spaces autocmd BufWritePre * :%s/\s\+$//e + " Compile on F12 -nnoremap :wa \| !make-client.py -inoremap :wa \|!make-client.py -vnoremap :wa \|!make-client.py +if executable('mars') + nnoremap :wa \| !mars + inoremap :wa \|!mars + vnoremap :wa \|!mars +elseif executable('make') + nnoremap :wa \| !make + inoremap :wa \|!make + vnoremap :wa \|!make +endif + " Escape on F1 map imap