Reputation: 63586
When I have many vim files open in different tmux panes, it becomes difficult to keep track of where they all are. I would love to see a list of open tmux panes labeled with the filename of the vim file being edited. Does such a plugin exist? Is it possible to create one?
Upvotes: 2
Views: 475
Reputation: 1137
tmux choose-window
will show the name of current directories of all buffers.
(0) 0: ssh "u35@localhost:~"
(1) 1: vim- "u0_a105@android:~/K/20081121"
(2) 2: vim "u0_a105@android:~/K/2014"
(3) 3: vim "u0_a105@android:~/K/20120430"
(4) 4: bash* "u0_a105@android:~/K/20081121"
I personnaly use bind-key '"' choose-window
so that ^A" gives this list like screen did.
If you want to see the name of current file, you might configure vim to change the buffer name, as bash is doing.
Upvotes: 0
Reputation: 196789
For such a plugin to work you would need all your vim instances to run as servers on the same machine in order to query all the visible instances for their bufferlist. This sounds like a pathetically complex solution to a really dumb problem, IMO.
Unless you have a very specific need you shouldn't run multiple vim instances. Vim is perfectly able to deal with dozens of files and has many plugins designed to make buffer management easier.
Start with :help buffers.
Also, tmux is a fine piece of software but you should probably take a moment to weight the complexity it adds to your setup and workflow against its actual benefits.
Upvotes: 3