christoomey / vim-tmux-runner

Vim and tmux, sittin' in a tree...
MIT License
291 stars 37 forks source link

Investigate options for smarter pane attaching #66

Open christoomey opened 7 years ago

christoomey commented 7 years ago

Currently VTR does the simple thing and just stores a pane_index in order to target the runner pane. If the user opens a new pane, the indexes might shift causing the commands to be sent to the wrong pane.

Wondering if there might be a way to "mark" or tag a pane (env variable? process id? pane_tty?) in some stable way that would survive window rearranging.

christoomey commented 7 years ago

pane_tty is not valid for targeting, but pane_id is (a string like %45. Stable and managed by tmux. Unique for the life of the session).

You can get the pane_id as the return value when creating a pane by doing tmux split-window -P -F '#{pane_id}'.

This'll take some heavy refactoring, but seems like a useful direction.

vinodkri commented 6 years ago

Hi Chris, Let me know if you need any help with this one?