diff options
| author | Teddy Wing | 2014-11-09 04:08:18 -0500 |
|---|---|---|
| committer | Teddy Wing | 2014-11-09 04:08:18 -0500 |
| commit | 2253eafc992d04e639f44de587c7e6bac119c1c8 (patch) | |
| tree | fa4e76419fa0aa44e8c8302dc8bd079b7dfebba8 /plugin | |
| parent | db90126c5a7b4031a7a97dd9c9b2e704ef06fdee (diff) | |
| download | auditory.vim-2253eafc992d04e639f44de587c7e6bac119c1c8.tar.bz2 | |
plugin/auditory.vim: Add Cantina insert mode
Version of insert mode binding that maps to the Cantina song. Bits of
the song are in wav files. They get played in order on keypress in
insert mode.
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/auditory.vim | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/plugin/auditory.vim b/plugin/auditory.vim index cb4cdfc..e2773db 100644 --- a/plugin/auditory.vim +++ b/plugin/auditory.vim @@ -49,7 +49,51 @@ function! s:PlayScale() endfunction -" auditory#InsertGalaxyFarFarAway() +let s:galaxy_far_far_away_index = 0 +function! s:GalaxyFarFarAway() + let cantina = [ + \ 'Cantina_1.1.wav', + \ 'Cantina_1.2.wav', + \ 'Cantina_1.3.wav', + \ 'Cantina_1.4.wav', + \ 'Cantina_2.1.wav', + \ 'Cantina_2.2.wav', + \ 'Cantina_2.3.wav', + \ 'Cantina_2.4.wav', + \ 'Cantina_3.1.wav', + \ 'Cantina_3.2.wav', + \ 'Cantina_3.3.wav', + \ 'Cantina_3.4.wav', + \ 'Cantina_4.1.wav', + \ 'Cantina_4.2.wav', + \ 'Cantina_4.3.wav', + \ 'Cantina_4.4.wav', + \ 'Cantina_5.1.wav', + \ 'Cantina_5.2.wav', + \ 'Cantina_5.3.wav', + \ 'Cantina_5.4.wav', + \ 'Cantina_6.1.wav', + \ 'Cantina_6.2.wav', + \ 'Cantina_6.3.wav', + \ 'Cantina_6.4.wav', + \ 'Cantina_7.1.wav', + \ 'Cantina_7.2.wav', + \ 'Cantina_7.3.wav', + \ 'Cantina_7.4.wav', + \ 'Cantina_8.1.wav', + \ 'Cantina_8.2.wav', + \ 'Cantina_8.3.wav', + \ 'Cantina_8.4.wav' + \ ] + + call auditory#Play('./Resources/Cantina/' . cantina[s:galaxy_far_far_away_index]) + + let s:galaxy_far_far_away_index += 1 + + if s:galaxy_far_far_away_index >= len(cantina) + let s:galaxy_far_far_away_index = 0 + endif +endfunction " Normal mode @@ -84,7 +128,8 @@ augroup auditory#insert_mode autocmd! " autocmd InsertEnter * call s:PlayInsertEnter() " autocmd InsertLeave * call s:PlayInsertLeave() - autocmd CursorMovedI * call s:PlayScale() + " autocmd CursorMovedI * call s:PlayScale() + autocmd CursorMovedI * call <SID>GalaxyFarFarAway() augroup END |
