diff options
| -rw-r--r-- | autoload/auditory.vim | 14 | 
1 files changed, 11 insertions, 3 deletions
| diff --git a/autoload/auditory.vim b/autoload/auditory.vim index 000498c..22a7cd1 100644 --- a/autoload/auditory.vim +++ b/autoload/auditory.vim @@ -435,9 +435,17 @@ let s:mappings['<c-r>'] = {  function! auditory#AssignNormalModeMappings()  	for [key, value] in items(s:mappings) -		" If this an `execute` mapping, add a pipe -		let l:pipe = match(value.map_to, 'exec') !=# -1 ? ' \| ' : '' +		let l:pipe = '' +		let l:silence = '' -		execute 'nmap <silent> ' . key . ' :<c-u>call auditory#Play("' . value.audio . '")' . l:pipe . value.map_to +		" If this an `execute` mapping +		if match(value.map_to, 'exec') !=# -1 +			let l:pipe = ' \| ' +			let l:silence = '<silent>' +		endif +		 +		execute 'nmap ' . l:silence . ' ' . key . +			\ ' :<c-u>call auditory#Play("' . value.audio . '")' . +			\ l:pipe . value.map_to  	endfor  endfunction | 
