aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-11-22 14:29:00 -0500
committerTeddy Wing2014-11-22 14:29:00 -0500
commit4cf56fd9514da6ec5f1f26273a8d89938d05513a (patch)
treefdb2226445d117f970f147b525e3cc205920fabc
parent2047439f2f6204df670a2f3a1d0a7a396c8f115e (diff)
parent8d0b1164a6d92a568df70d7b98f4b0904a791331 (diff)
downloadauditory.vim-4cf56fd9514da6ec5f1f26273a8d89938d05513a.tar.bz2
Merge branch 'error-message-if-no-mplayer'
-rw-r--r--TODO2
-rw-r--r--plugin/auditory.vim7
2 files changed, 8 insertions, 1 deletions
diff --git a/TODO b/TODO
index dc9099c..e4fa8a2 100644
--- a/TODO
+++ b/TODO
@@ -12,7 +12,7 @@ v Add pathogen instructions to README (2014.11.15)
2014.11.10:
v Make `dd` work to delete a line
-- Checking whether mplayer is installed and send an error if not
+v Checking whether mplayer is installed and send an error if not
- Adding some docs
- Global setting for Galaxy Far Far Away mode
- Add an easy way to turn the plugin on and off without having to disable it manually
diff --git a/plugin/auditory.vim b/plugin/auditory.vim
index 87585a3..3ada40e 100644
--- a/plugin/auditory.vim
+++ b/plugin/auditory.vim
@@ -1,3 +1,10 @@
+" Require mplayer otherwise fail
+if !executable('mplayer')
+ echomsg 'Auditory.vim requires `mplayer` to be installed'
+ finish
+endif
+
+
augroup auditory#insert_mode
autocmd!
autocmd CursorMovedI * call auditory#PlayScale()