From 8a0fd42b1df21aa9bd1c9d6f8b169d060ea8db6e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 16 Aug 2015 02:43:09 -0400 Subject: Add function and command to toggle mappings * Create `auditory#ToggleMappings()` that turns sounds on if they're off and off if they're on * Create an `:AuditoryToggle` command that runs the toggle function in a more user-friendly callable way With a toggle command, turning Auditory on or off can be as simple as hitting 1 custom mapping. With our previous `AuditoryOn` and `AuditoryOff`, you would have to use 2 mappings: 1 for on and another for off. --- plugin/auditory.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'plugin') diff --git a/plugin/auditory.vim b/plugin/auditory.vim index 39ae283..378fd39 100644 --- a/plugin/auditory.vim +++ b/plugin/auditory.vim @@ -18,6 +18,7 @@ endif command! AuditoryOn call auditory#AssignMappings() command! AuditoryOff call auditory#Unmap() +command! AuditoryToggle call auditory#ToggleMappings() command! AuditoryToggleGalaxyFarFarAway call auditory#ToggleGalaxyFarFarAway() -- cgit v1.2.3