diff --git a/README.md b/README.md index 2711411..320b340 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,8 @@ These are some of the commands that can be run from Vim command line: * `:TidalHush`: Silences all streams by sending `hush`. +* `:TidalPanic`: Silences Tidal immediately by sending `panic`. + * `:TidalGenerateCompletions {path}`: Generate dictionary for Dirt-Samples completion (path is optional). diff --git a/ftplugin/tidal.vim b/ftplugin/tidal.vim index 2ed7e15..02eb035 100644 --- a/ftplugin/tidal.vim +++ b/ftplugin/tidal.vim @@ -74,6 +74,8 @@ if !exists("g:tidal_no_mappings") || !g:tidal_no_mappings nnoremap h :TidalHush nnoremap :TidalHush + nnoremap p :TidalPanic + nnoremap :TidalPanic let i = 1 while i <= 9 execute 'nnoremap '.i.' :TidalSilence '.i.'' diff --git a/plugin/tidal.vim b/plugin/tidal.vim index 791615d..b44c338 100644 --- a/plugin/tidal.vim +++ b/plugin/tidal.vim @@ -377,6 +377,10 @@ function! s:TidalHush() execute 'TidalSend1 hush' endfunction +function! s:TidalPanic() + execute 'TidalSend1 panic' +endfunction + function! s:TidalSilence(stream) silent execute 'TidalSend1 d' . a:stream . ' silence' endfunction @@ -421,6 +425,7 @@ command -range -bar -nargs=0 TidalSend ,call s:TidalSendRange() command -nargs=+ TidalSend1 call s:TidalSend() command! -nargs=0 TidalHush call s:TidalHush() +command! -nargs=0 TidalPanic call s:TidalPanic() command! -nargs=1 TidalSilence call s:TidalSilence() command! -nargs=1 TidalPlay call s:TidalPlay() command! -nargs=? TidalGenerateCompletions call s:TidalGenerateCompletions()