From 957cc40ba08d66d9b39edda074662677d3d6f21a Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 16 Aug 2015 02:34:36 -0400 Subject: plugin/auditory.vim: Check for `g:auditory_on` Don't heedlessly turn on sounds when the plugin is loaded. Instead, give users a choice of whether or not sounds should be loaded when starting Vim with a configuration variable that can be set in a user vimrc. By default sounds are now off. --- plugin/auditory.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/auditory.vim b/plugin/auditory.vim index e0a764a..593617e 100644 --- a/plugin/auditory.vim +++ b/plugin/auditory.vim @@ -11,9 +11,16 @@ if !executable('mplayer') endif +if !exists('g:auditory_on') + let g:auditory_on = 0 +endif + + command! AuditoryOn call auditory#AssignMappings() command! AuditoryOff call auditory#Unmap() command! AuditoryToggleGalaxyFarFarAway call auditory#ToggleGalaxyFarFarAway() -call auditory#AssignMappings() +if g:auditory_on ==# 1 + call auditory#AssignMappings() +endif -- cgit v1.2.3