From f87ae56b53f46654df2d0a6decdd5c12b2620f8b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 18 Jul 2015 21:05:01 -0400 Subject: autoload/auditory.vim: Delete auditory#NormalModeMappings() Now that we're assigning our mappings using the mapping dictionary, we can remove the old function that applied the mappings manually. It definitely less clear an readable I'll admit, but this allows us more flexibility and hopefully customisability. The original plan with the mapping dictionary was to allow toggling of the mappings on and off, so hopefully it will help with that. --- autoload/auditory.vim | 79 --------------------------------------------------- 1 file changed, 79 deletions(-) (limited to 'autoload') diff --git a/autoload/auditory.vim b/autoload/auditory.vim index 2176a4c..000498c 100644 --- a/autoload/auditory.vim +++ b/autoload/auditory.vim @@ -441,82 +441,3 @@ function! auditory#AssignNormalModeMappings() execute 'nmap ' . key . ' :call auditory#Play("' . value.audio . '")' . l:pipe . value.map_to endfor endfunction - -function! auditory#NormalModeMappings() - nnoremap h :call auditory#Play('/Resources/Normal_Mode/Left.wav') \| exec 'normal!' v:count1 . 'h' - nnoremap j :call auditory#Play('/Resources/Normal_Mode/Down.wav') \| exec 'normal!' v:count1 . 'j' - nnoremap k :call auditory#Play('/Resources/Normal_Mode/Up.wav') \| exec 'normal!' v:count1 . 'k' - nnoremap l :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . 'l' - - nnoremap gj :call auditory#Play('/Resources/Normal_Mode/Down.wav') \| exec 'normal!' v:count1 . 'gj' - nnoremap gk :call auditory#Play('/Resources/Normal_Mode/Up.wav') \| exec 'normal!' v:count1 . 'gk' - - nnoremap :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . '' - - " FIXME: allow counts on the delete key - nnoremap :call auditory#Play('/Resources/Normal_Mode/Left.wav') - - nnoremap 0 :call auditory#Play('/Resources/Normal_Mode/Left.wav')0 - nnoremap ^ :call auditory#Play('/Resources/Normal_Mode/Left.wav') \| exec 'normal!' v:count1 . '^' - nnoremap _ :call auditory#Play('/Resources/Normal_Mode/Left.wav') \| exec 'normal!' v:count1 . '_' - nnoremap $ :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . '$' - nnoremap g_ :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . 'g_' - nnoremap % :call auditory#Play('/Resources/Normal_Mode/Jump.wav')% - - nnoremap b :call auditory#Play('/Resources/Normal_Mode/Left.wav') \| exec 'normal!' v:count1 . 'b' - nnoremap w :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . 'w' - nnoremap e :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . 'e' - nnoremap B :call auditory#Play('/Resources/Normal_Mode/Left.wav') \| exec 'normal!' v:count1 . 'B' - nnoremap W :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . 'W' - nnoremap E :call auditory#Play('/Resources/Normal_Mode/Right.wav') \| exec 'normal!' v:count1 . 'E' - - nnoremap p :call auditory#Play('/Resources/Normal_Mode/Paste.wav') \| exec 'normal!' v:count1 . 'p' - nnoremap P :call auditory#Play('/Resources/Normal_Mode/Paste.wav') \| exec 'normal!' v:count1 . 'P' - - nnoremap / :call auditory#Play('/Resources/Normal_Mode/Search.wav')/ - nnoremap n :call auditory#Play('/Resources/Normal_Mode/Search.wav')n - nnoremap N :call auditory#Play('/Resources/Normal_Mode/Search.wav')N - nnoremap # :call auditory#Play('/Resources/Normal_Mode/Search.wav')# - nnoremap * :call auditory#Play('/Resources/Normal_Mode/Search.wav')* - - nnoremap zt :call auditory#Play('/Resources/Normal_Mode/Jump.wav')zt - nnoremap z. :call auditory#Play('/Resources/Normal_Mode/Jump.wav')z. - nnoremap zz :call auditory#Play('/Resources/Normal_Mode/Jump.wav')zz - nnoremap zb :call auditory#Play('/Resources/Normal_Mode/Jump.wav')zb - - " FIXME: Allow these scrolling commands to support counts. Was getting errors constructing them the other way - nnoremap :call auditory#Play('/Resources/Normal_Mode/Jump.wav') - nnoremap :call auditory#Play('/Resources/Normal_Mode/Jump.wav') - nnoremap :call auditory#Play('/Resources/Normal_Mode/Jump.wav') - - " FIXME: need to press twice in order for it to work - nnoremap :call auditory#Play('/Resources/Normal_Mode/Jump.wav') - - nnoremap H :call auditory#Play('/Resources/Normal_Mode/Jump.wav')H - nnoremap M :call auditory#Play('/Resources/Normal_Mode/Jump.wav')M - nnoremap L :call auditory#Play('/Resources/Normal_Mode/Jump.wav')L - - nnoremap ( :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count1 . '(' - nnoremap ) :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count1 . ')' - nnoremap { :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count1 . '{' - nnoremap } :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count1 . '}' - - nnoremap :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count1 . '' - nnoremap :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count1 . '' - - nnoremap gg :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count1 . 'gg' - nnoremap G :call auditory#Play('/Resources/Normal_Mode/Jump.wav') \| exec 'normal!' v:count . 'G' - - nnoremap x :call auditory#Play('/Resources/Normal_Mode/Delete.wav') \| exec 'normal!' v:count1 . 'x' - vnoremap x :call auditory#Play('/Resources/Normal_Mode/Delete.wav') \| exec 'normal!' v:count1 . 'x' - " nnoremap d :call auditory#Play('/Resources/Normal_Mode/Delete.wav') \| exec 'normal!' v:count1 . 'd' - " nnoremap d :set opfunc=d \| call auditory#Play('/Resources/Normal_Mode/Delete.wav') \| exec 'normal!' v:count1 . @g - - " inoremap :call auditory#Play('/Resources/auto_complete.wav')a - " inoremap :call auditory#Play('/Resources/auto_complete.wav')a - - nnoremap u :call auditory#Play('/Resources/Normal_Mode/Undo.wav') \| exec 'normal!' v:count1 . 'u' - - " Note: redo doesn't currently support a count because the `v:count1` was giving me an error - nnoremap :call auditory#Play('/Resources/Normal_Mode/Redo.wav') -endfunction -- cgit v1.2.3