aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-11-22 13:53:42 -0500
committerTeddy Wing2014-11-22 13:53:42 -0500
commit5499449cfea44f2a33a0cf8fa039adf96cc6f313 (patch)
tree376c8acdc5835f2d0a921f5e7abc4780d81446c7
parent2047439f2f6204df670a2f3a1d0a7a396c8f115e (diff)
downloadauditory.vim-5499449cfea44f2a33a0cf8fa039adf96cc6f313.tar.bz2
plugin/auditory.vim: Show warning if mplayer not installed
On plugin load, if mplayer isn't installed then fail ungracefully. Since we depend on mplayer in order to play any sounds, my thinking now is that I want to fail immediately. Still trying to decide if this is be best course of action. Maybe I just want an informative message instead of a complete failure.
-rw-r--r--plugin/auditory.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/auditory.vim b/plugin/auditory.vim
index 87585a3..b657bd9 100644
--- a/plugin/auditory.vim
+++ b/plugin/auditory.vim
@@ -1,3 +1,10 @@
+" Require mplayer otherwise fail
+if !executable('mplayer')
+ echoerr 'Auditory.vim requires `mplayer` to be installed'
+ finish
+endif
+
+
augroup auditory#insert_mode
autocmd!
autocmd CursorMovedI * call auditory#PlayScale()