general todo: add popup-menues, drawer: change tab before context menu is closed!!

Vim Mac GUI tabline

There are several ways to implement gui tabs in mac vim:

Segmented view



There are two ways this can be implemented:

  1. Put the segmented view in the root view of the window. This has the advantage that it works with less effort and gives more vertical room for vim (but makes moving the window with the mouse somewhat harder). Another problem is that no title bar text is available, this is annoying if you use Expose for example.
  2. Put the segmented view in the content view of the window. This requires more changes (vim's text window has to be converted to a view, which are only supported from 10.2 on), but it's what you'd normally expect. Plus, if the text area is a view, this gives us the ability to add a toolbar as well; it should also improve drawing performance and is recommended by apple as the "future".

The segmented view should change its size when the window is resized, if there are a lot of tabs, they should be made smaller so that they are all visible. Alternatively, left/right arrows can be added after a certain minimal tab size (see this page for an example).

It looks like this:

Vim with a segment view tabline

todo: make tabs clickable ( gui_mac_doMouseDownEvent ?), make tabs smaller if they don't fit otherwise, resize max toolbar size when window is resized




It looks like this:

Vim with a drawer "tabline"

todo: crashes when -p *.h is used (stl=1, close all but the first tab, open new tab) (might be fixed by now, was unable to reproduce this), if the window size is set to a smaller than minmal height with :set lines=10 the display looks really strange, scrollbar flashes black on tab change, context menu close is only applied after mouse move

One window for each tab

Use a separate window for each tab. This would be very maccy, but has probably some problems because the windows can have different sizes.

External tab lib

Use this tab control.



Other stuff

Other stuff that could be improved in mac vim:

Smoke tests