aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-11-09 10:21:34 -0500
committerTeddy Wing2014-11-09 10:21:50 -0500
commit58fc8cf24f62e43a9b5621e186848a6d1c108462 (patch)
tree85df035181f27752c50d20263fb824f1c05dd0ef
parentb63e44755797bca6e566c9b04c0c60be1729d526 (diff)
downloadauditory.vim-58fc8cf24f62e43a9b5621e186848a6d1c108462.tar.bz2
autoload/auditory.vim: Add undo & redo mappings
Again had an issue with adding a count to one of the mappings, in this case with redo. Leaving the mapping active except not supporting a count. Hopefully we can figure out how to fix that.
-rw-r--r--autoload/auditory.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/auditory.vim b/autoload/auditory.vim
index fdd262a..31ae18b 100644
--- a/autoload/auditory.vim
+++ b/autoload/auditory.vim
@@ -195,4 +195,9 @@ function! auditory#NormalModeMappings()
" inoremap <silent> <c-p> <esc>:<c-u>call auditory#Play('/Resources/auto_complete.wav')<cr>a<c-p><c-p>
" inoremap <silent> <c-n> <esc>:<c-u>call auditory#Play('/Resources/auto_complete.wav')<cr>a<c-n><c-n>
+
+ nnoremap <silent> u :<c-u>call auditory#Play('/Resources/Normal_Mode/Undo.wav') \| exec 'normal!' v:count1 . 'u'<cr>
+
+ " Note: redo doesn't currently support a count because the `v:count1` was giving me an error
+ nnoremap <silent> <c-r> :<c-u>call auditory#Play('/Resources/Normal_Mode/Redo.wav')<cr><c-r>
endfunction