9

Is it possible to have vim's tab list presented vertically on the left side of the editor?

alt text

It'd be really helpful, but I haven't managed find any plugins that can do this yet. (do i suck at google?)

Joernsn
  • 2,319
  • 4
  • 25
  • 33

5 Answers5

4

I would agree with Randy about the use of tabs. But I also looked for the possibility to have vertical tabs in gvim some time ago. To do this you have to modify the sources. For gvim, it's not too much work since the gtk_notebook widget is used for the tabs. For vim, it might be quite some more work. You can find the patch/hack I've made here. I commented some stuff regarding the height of the window, and added a hbox and a vbox to put the gui.tabline where I wanted it (on the left side). I set the label length to a maximum width to set a maximum tab size... It fits my needs but it really is just a hack and doesn't intent to be nicely programmed.

I'm sorry, it's not a plugin and it does not apply to vim, but if you really need this feature, switching to gvim might not be too much of a difference.

e-malito
  • 878
  • 1
  • 7
  • 14
3

It seems to me as though you are using tabs as buffers. I'd politely ask that you take a second to read this answer if that is indeed the case. I'd also strongly urge you to change this habit.

However, if you are indeed using tabs for this purpose you could potentially get a 'vertical tab list' by issuing :ls to list the buffers. You could also use one of the many buffer explorer plugins that are available.

Community
  • 1
  • 1
Randy Morris
  • 39,631
  • 8
  • 69
  • 76
  • 5
    I don't think this answer is helpful. What he wants is to show all tabs on the side, instead of showing them on the top. – Johannes Bittner Apr 16 '12 at 14:24
  • @JohannesBittner You are wrong. Look at the [documentation of minibufexplorer](https://github.com/fholgado/minibufexpl.vim/blob/d92c8b01248d612444829001b3e081629d37a1aa/doc/minibufexpl.txt#L510), it supports vertical variant. – ZyX Jul 24 '12 at 14:04
1

If using Gvim, then you could tearoff the Buffers menu using :te Buffers and position it as a sidebar.

Not the same as tabs but could suffice as a user interface workaround.

mvanle
  • 1,847
  • 23
  • 19
  • To me, GVim said that "the command is not available in this version" when I tried your suggestion. What instead worked was using the command `:set guioptions+=t` and then clicking the _Buffers_ menu and choosing the dashed line entry (the top one). – Ruslan Aug 24 '19 at 21:57
0

Did you try buffergator? After you install it it has a command :BuffergatorTabsOpen that shows the open tabs in a vertical window...

skeept
  • 12,077
  • 7
  • 41
  • 52
-1

You don't know it yet, but command you're looking for is :tabs.

For context: I use gvim --remote-tab almost exclusively to launch an editor. I tried Randy's :ls for a bit, but after leaving gvim open for a week or two, the list eventually got filled with cruft from tabs that I had already :quit. After reading the manual, I found :tabs.

alsuren
  • 168
  • 1
  • 2