Skip to content

Commit 8104a33

Browse files
committed
Improve error handling and informing user
1 parent 7c1a5a1 commit 8104a33

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

plugin/gtm.vim

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ if exists('g:gtm_plugin_loaded') || &cp
77
endif
88
let g:gtm_plugin_loaded = 0
99

10-
let s:gtm_ver_req = '>= 1.0-beta.6'
10+
let s:gtm_ver_req = '>= 1.0-beta.7'
1111

12-
let s:no_gtm_err = 'GTM exe not found, install GTM or update path, see https://www.github.com/git-time-metric/gtm'
13-
let s:gtm_ver_err = 'GTM exe is out of date, please install the latest GTM, see https://www.github.com/git-time-metric/gtm'
12+
let s:no_gtm_err = 'GTM exe not found, install GTM or update your path'
13+
let s:gtm_ver_err = 'GTM exe is out of date and may not work properly, please install the latest GTM exe'
14+
let s:gtm_url = 'see https://www.github.com/git-time-metric/gtm'
1415

1516
if executable('gtm') == 0
17+
echomsg '.'
1618
echomsg s:no_gtm_err
17-
echomsg "GTM plug-in NOT LOADED"
19+
echomsg s:gtm_url
20+
echomsg '.'
1821
finish
1922
endif
2023

@@ -31,9 +34,10 @@ function! s:verify(ver)
3134
endfunction
3235

3336
if s:verify(s:gtm_ver_req) == 0
37+
echomsg '.'
3438
echomsg s:gtm_ver_err
35-
echomsg "GTM plug-in NOT LOADED"
36-
finish
39+
echomsg s:gtm_url
40+
echomsg '.'
3741
endif
3842

3943
" plug-in is loading successfully

0 commit comments

Comments
 (0)