Skip to content

Commit

Permalink
Replace tmux send-keys/select-pane commands with split-window args
Browse files Browse the repository at this point in the history
  • Loading branch information
kneitinger committed Aug 9, 2020
1 parent 2f0f16c commit 29788c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ftplugin/supercollider.vim
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ function SClangStart(...)
wincmd w
elseif l:tmux || l:screen
if l:tmux
let l:cmd = "tmux split-window -" . l:splitDir . " -p " . l:splitSize . " ;"
let l:cmd .= "tmux send-keys " . s:sclangPipeApp . " Enter ; tmux select-pane -l"
" To disable focusing on the newly created pane, -d flag is used
let l:cmdfmt = "tmux split-window -d -%s -p %d %s"
let l:cmd = printf(l:cmdfmt, l:splitDir, l:splitSize, l:sclangPipeApp)
call system(l:cmd)
elseif l:screen
" Main window will have focus when splitting, so recalculate splitSize percentage
Expand Down

0 comments on commit 29788c2

Please sign in to comment.