aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-11-27 17:10:59 -0500
committerTeddy Wing2014-11-27 17:10:59 -0500
commit91d022026f10bac96ed9f7ad7ff22fbd8e2b2c62 (patch)
tree000b6b8c9bbdb087e341921d08897f8d488400eb
parent8166b9a93fae387076b581e300232fe70707b605 (diff)
downloadauditory.vim-0.0.5.tar.bz2
plugin/auditory.vim: Don't reload the plugin if loadedv0.0.5
I see this in the sources of all the plugins I look at. Figure I should be a good Vim plugin citizen and do this too. This should also provide a convenient way to turn off the plugin when starting Vim.
-rw-r--r--plugin/auditory.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/auditory.vim b/plugin/auditory.vim
index 3ada40e..821c5ba 100644
--- a/plugin/auditory.vim
+++ b/plugin/auditory.vim
@@ -1,3 +1,9 @@
+if exists('g:loaded_auditory')
+ finish
+endif
+let g:loaded_auditory = 1
+
+
" Require mplayer otherwise fail
if !executable('mplayer')
echomsg 'Auditory.vim requires `mplayer` to be installed'