Skip to content

Re-use the vimux pane over sessions #70

@yfyf

Description

@yfyf

Hi,

First of all, pretty awesome plugin, good integration with a proper shell is something I've always been jealous of Emacs users and this is at least some steps in that direction.

What I'm missing though is the ability to do this:

  1. Start vim
  2. Send some commands via vimux and obtain a new vimux pane
  3. Close vim, leave the vimux pane open
  4. Do some stuff, start vim again
  5. Run more commands via vimux, but instead of vimux creating a new pane, it re-uses the old one.

This would allow to have a kind of "dedicated" tmux pane which acts as REPL. This could be a configurable option such as VimuxUniquePane.

The only problem is that it's kind of hard to access pane's in tmux, but there are two hackish approaches:

  1. Set the pane title to something like VimuxPane and add a check to look if one exists next time vimux is used. Note that the pane title is not set or maintained by tmux, it's the title set by the OSC title setting sequence, so potentially it can be changed by something running in the shell, which is not nice.
  2. Store the vimux pane ID (not index) (which is unique over the whole session according to tmux's docs) somewhere and reuse that.

I think the second approach is much less hackish, but then the pane ID needs to be stored somewhere.
EDIT: I guess viminfo could be used for that? :help viminfo

If you would agree with such a feature I could contribute a patch for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions