Skip to content

Commit

Permalink
Check vimproc.vim availability first
Browse files Browse the repository at this point in the history
  • Loading branch information
eagletmt committed Feb 21, 2014
1 parent 76b0235 commit 4c6083b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions after/ftplugin/haskell/ghcmod.vim
Expand Up @@ -3,6 +3,22 @@ if exists('b:did_ftplugin_ghcmod') && b:did_ftplugin_ghcmod
endif
let b:did_ftplugin_ghcmod = 1

if !exists('s:has_vimproc')
try
call vimproc#version()
let s:has_vimproc = 1
catch /^Vim\%((\a\+)\)\=:E117/
let s:has_vimproc = 0
endtry
endif

if !s:has_vimproc
echohl ErrorMsg
echomsg 'ghcmod: vimproc.vim is not installed!'
echohl None
finish
endif

if !exists('s:has_ghc_mod')
let s:has_ghc_mod = 0

Expand Down

0 comments on commit 4c6083b

Please sign in to comment.