aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorTeddy Wing2015-07-18 22:26:29 -0400
committerTeddy Wing2015-07-18 22:26:29 -0400
commitb262ac5ba505c6ee27ad3dcf0db8b868f52a100b (patch)
tree10b5736a33973c199f90e2d72225c6c79d45bc4d /autoload
parenta3fcb8c8a3b7d05ef354aa250acef49d2c5a8fba (diff)
downloadauditory.vim-b262ac5ba505c6ee27ad3dcf0db8b868f52a100b.tar.bz2
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.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/auditory.vim2
1 files changed, 1 insertions, 1 deletions
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 <silent>' . key .
+ execute 'nnoremap <silent>' . key .
\ ' :<c-u>call auditory#Play("' . value.audio . '")' .
\ l:pipe . value.map_to
endfor