macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.5k stars 681 forks source link

Multiple app windows support per a single session #1243

Closed poige closed 2 years ago

poige commented 2 years ago

It's widely known that with numerous open files usefulness of window tabs significantly reduces. They have to become smaller, and/or some scrolling which hides a part of them is needed or, say, vertical layout which isn't currently implemented, helps but even being implemented it just wins some more space but doesn't solve the issue. The issue is "tabs clutter" and everyone typically is well aware of what it is.

OTOH the proposed multiple app windows per session support doesn't break anything in existing Vim's structures. There's no difference if buffers are mapped onto windows in a single app window or to a few windows of such an app.

ychin commented 2 years ago

OTOH the proposed multiple app windows per session support doesn't break anything in existing Vim's structures.

That is not true. Vim itself manages the different tabs and splits, and doesn't really surface a way for the GUI to render the different tabs in different windows easily. It would require a rearchitecture of Vim itself to be able to do this (for example see some of Neovim's work).

Closing for now because this isn't something that we can do easily.

poige commented 2 years ago

hm, okay, let's look at it in this way: obviously one can have at least multiple app windows sharing the same geometry w/o diving into any depths of how vim itself manages tabs/splits — same dimensions of the window makes it indistinguishable from just another "tabs" of the main window.

ychin commented 2 years ago

Hmm so, what is the proposal here? Are you saying that let's say I made a new Vim tab, it will show up in a new window next to it? So if I do this:

:e a.txt
:tab split b.txt

You are saying that you want two side-by-side windows, with one showing a.txt, the other showing b.txt? Meanwhile they all share the same underlying Vim session (e.g. they can refer to each other's buffers).

The point I'm trying to say is that this isn't really doable unless you change how Vim works. Vim just wouldn't know about having multiple windows and wouldn't concurrently support editing both tabs, and MacVim can't just add this on top of Vim without breaking a lot of things, since it's ultimately just a GUI on top of vanilla Vim (with some mods).