diff options
| author | Teddy Wing | 2015-08-16 02:34:36 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-08-16 02:36:36 -0400 |
| commit | 957cc40ba08d66d9b39edda074662677d3d6f21a (patch) | |
| tree | c2088f593c6af56a998bd2c790aa412e149b5d93 | |
| parent | f3444f5dcfa269eee62b8daf552b3ed29a43aa04 (diff) | |
| download | auditory.vim-957cc40ba08d66d9b39edda074662677d3d6f21a.tar.bz2 | |
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.
| -rw-r--r-- | plugin/auditory.vim | 9 |
1 files changed, 8 insertions, 1 deletions
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 |
