preservim / vimux

easily interact with tmux from vim
MIT License
2.19k stars 159 forks source link

Added possibility to choose a different session #138

Open m42e opened 8 years ago

m42e commented 8 years ago

Allow to specify a session which shall be used to create a new window in it.

Many developers have a second or third screen. To allow usage as output screen, this PR allows to specify a tmux session by name where the command should be run in. The current active window within the session is used if the session exists else a new session is created.

dkrieger commented 8 years ago

There are several places in 2285ce that rely on [window].[pane] to specify panes. This feature should change those to use the unique id of the pane instead. In general, vimux assumes we want the current session throughout the code, so some careful refactoring throughout the whole plugin would be necessary for this feature to be "complete" and integrated with the codebase, IMHO

m42e commented 3 years ago

I'll update it :) Thanks for the effort you put in.

m42e commented 3 years ago

After rethinking it, I am not a 100% sure it is kind of required anymore. tmux meanwhile supports multiple clients viewing different windows. So you could simply use another window in the same session with an additional client attached to it.

So what do you think?

alerque commented 3 years ago

I agree Tmux does have another way to skin this cat. However being able to set this up in Vimux without messing with the shared client features of Tmux might make more sense in some people's workflow. I'm also curious as to whether this might fix the issue in #70. Obviously that wasn't what it was originally for, but it does seem like it would solve that problem too, no?

m42e commented 3 years ago

Yeah, you might be right, that may enable a workflow which is like the one described in #70. Ok, I will give it a try.

alerque commented 3 years ago

Does the merger of #180 render this PR obsolete?

m42e commented 3 years ago

No it doesn't. It is kind of the first step towards a good solution for this change. I investigate a bit further to see what's the best solution to do it.