From b262ac5ba505c6ee27ad3dcf0db8b868f52a100b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 18 Jul 2015 22:26:29 -0400 Subject: autoload/autoload.vim: Use `nnoremap` instead of `nmap` I wanted to use `nmap` so that user-defined commands would come through, but that caused the sounds to play recursively, a problem I now remember from when I originally wrote this. Change it to `nnoremap` by default to get around this. We'll look into whether it's possible to get user-defined mappings attached somehow. Maybe in the save-and-restore process. --- autoload/auditory.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/auditory.vim b/autoload/auditory.vim index 596fefe..a981e0a 100644 --- a/autoload/auditory.vim +++ b/autoload/auditory.vim @@ -438,7 +438,7 @@ function! auditory#AssignNormalModeMappings() " If this an `execute` mapping, add a pipe let l:pipe = match(value.map_to, 'exec') !=# -1 ? ' \| ' : '' - execute 'nmap ' . key . + execute 'nnoremap ' . key . \ ' :call auditory#Play("' . value.audio . '")' . \ l:pipe . value.map_to endfor -- cgit v1.2.3