Replace tmux send-keys/select-pane commands with split-window args#68
Open
kneitinger wants to merge 1 commit intosupercollider:mainfrom
Open
Replace tmux send-keys/select-pane commands with split-window args#68kneitinger wants to merge 1 commit intosupercollider:mainfrom
kneitinger wants to merge 1 commit intosupercollider:mainfrom
Conversation
29788c2 to
cc370db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
First, I just want to say that I really appreciate this plugin, and thanks for all of the work on t!
I started using it with
tmuxrecently, and really like the launching, but found it's behavior to be somewhat non-ideal.Problem statement
When I run
:SClangStart, a new pane is correctly created with the desired orientation and size, and the sc pipe command is typed, but not started. The focus remains on the newly created tab, and I must press the Enter key to kick off the command, and then manually navigate back to the original pane. Furthermore, if I run:SClangKill, Ctrl-csclangor exit vim, the new pane remains open and is just a new shell now.The
tmuxcommand generated inftplugin/supercollider.vimscvim/ftplugin/supercollider.vim
Lines 262 to 263 in d80cf6e
ends up looking something like
or:
start_pipecommand and the enter keyOn 4 computers I tested this on, the
send-keysapproach can never kick off the command and return to the original tmux pane.Proposed fix
In looking at the man page for
tmux, I found thatsplit-windowhas flags for the behavior that thesend-keysandselect-paneare currently handling, and they work more reliably and in a more expected way.An example of the command generated by the refactor in this PR is:
in other words:
-d, do not focus the new panestart_pipecommand and close pane whensclangstops for any reason.This works reliably, immediately, and more ergonomically than the current approach, and feels more consistent with the behavior I was seeing when I wasn't using a terminal multiplexer.
Thanks again!