Skip to content

add :TidalPanic command like :TidalHush #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 2 additions & 0 deletions ftplugin/tidal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ if !exists("g:tidal_no_mappings") || !g:tidal_no_mappings

nnoremap <buffer> <localleader>h :TidalHush<cr>
nnoremap <buffer> <c-h> :TidalHush<cr>
nnoremap <buffer> <localleader>p :TidalPanic<cr>
nnoremap <buffer> <c-p> :TidalPanic<cr>
let i = 1
while i <= 9
execute 'nnoremap <buffer> <localleader>'.i.' :TidalSilence '.i.'<cr>'
Expand Down
5 changes: 5 additions & 0 deletions plugin/tidal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -421,6 +425,7 @@ command -range -bar -nargs=0 TidalSend <line1>,<line2>call s:TidalSendRange()
command -nargs=+ TidalSend1 call s:TidalSend(<q-args>)

command! -nargs=0 TidalHush call s:TidalHush()
command! -nargs=0 TidalPanic call s:TidalPanic()
command! -nargs=1 TidalSilence call s:TidalSilence(<args>)
command! -nargs=1 TidalPlay call s:TidalPlay(<args>)
command! -nargs=? TidalGenerateCompletions call s:TidalGenerateCompletions(<q-args>)
Expand Down