-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(layout/#592): layout tabs - part 1 #2013
Conversation
Wow, this is looking great @glennsl ! Thanks for the work on this. |
I can help with this piece, if you'd like, and haven't started it - |
One thing to think about that isn't called out on your list is the Related to this - if I close (press the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had minor feedback around the quit/close behavior - but this is awesome to finally have layouts decoupled like this. Overall looks great!
Already working on it. Implemented it twice even! First as an extension of the goto callback, but then after discovering it was tightly (and weirdly) tied to multiple
Ah, yeah, sorry. That behaviour was intended only for when the last layout tab was closed. I forgot to test and handle these other cases, so it just falls back to that. Will fix! |
The Ubuntu 16 CI seems to fail consistently on
Makes no sense to me though... |
Cool, sounds good. Thanks for looking into it!
Ouch, ya, I'm looking into it - it's unrelated to your changes. I also see this in the log:
It shouldn't need to run |
The closing behaviour should be fixed now. But please do check thoroughly, as it's surprisingly complex with all the different levels and ways of closing. |
This adds a new concept of "layout tabs", which behave more like the tabs in vim. By default these tabs are positioned at the bottom to avoid two levels of tabs at the top, but they can be positioned at the top using the
oni.layout.layoutTabPosition
configuration setting. They can also be hidden, or made to always show, usingoni.layout.showLayoutTabs
.To mimic the layout of vim, use:
There's still a bit of work to get faithful vim behaviour though. These are the next steps I plan to work on:
:tab*
commands (:tabnew
and:tabedit
already work, although not entirely correctly)gt
andgT
. This must be done fromlibvim
for the moment due to bugs ineditor-input
, but shouldn't be too hard.showTabs
is off.BufferEnter
), and it's not possible to open an empty split or layout tab before opening the buffer. Therefore the only two options are to either open a new split or layout tab with the currently active editor and then open the buffer, or to open the buffer in the old split/layout tab before opening a new one. Either way there'll be an extra editor that shouldn't be there.Addresses #592