Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim: Is vertical tab list possible?

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?)

like image 498
Joernsn Avatar asked Jan 10 '11 09:01

Joernsn


People also ask

What is the purpose of vertical tab?

Instead of shrinking down tab names as you open more and more tabs, vertical tabs let you see the full tab name in a cleaner list. In addition to feeling more natural, as we mentioned earlier, this allows you to click and drag your tabs from top to bottom in an order you see fit.

What is vertical tabulator?

Vertical tab was used to speed up printer vertical movement. Some printers used special tab belts with various tab spots.

How do I set up spaces instead of tabs in Vim?

Set 'tabstop' and 'shiftwidth' to whatever you prefer and use 'expandtab'. This way you will always insert spaces.


2 Answers

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.

like image 54
e-malito Avatar answered Sep 25 '22 05:09

e-malito


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.

like image 34
Randy Morris Avatar answered Sep 24 '22 05:09

Randy Morris