Skip to content
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

Implement buffer ordering #10077

Closed
wants to merge 2 commits into from

Conversation

masonj5n
Copy link

@masonj5n masonj5n commented Apr 1, 2024

Closes #3707

This is WIP, but I figured I'd put it up to start gathering some feedback.

This PR implements buffer reordering, currently only supporting incrementing and decrementing the ordering of the current buffer.

It adds a new document_ordering field to the Editor which must be kept in-sync with the actual documents in the editor (I'd be surprised if what I have currently doesn't contain any bugs that let the documents and document ordering go out-of-sync, I tried to find all the places where docs are actually added and removed) and uses the document ordering to power the way the bufferline is drawn as well as how the goto_next_buffer and goto_previous_buffer commands work.

If we're okay with the general approach I'm curious if we should add ordering to the bufferline picker or expose in some other way what the actual current ordering is, since it's no longer solely based on the document ID.

buffer_reordering_720.mov

@masonj5n masonj5n marked this pull request as ready for review April 2, 2024 00:06
@pascalkuthe
Copy link
Member

Thank you for contributing .

I don't think this is something we will windup merging. I think bufferline and gn/gp encouraged a more gui/mouse driven tab like workflow which motivated this featured. But with helix we would like to remain focused on buffer picker / recently used style ordering.

We already have automatically recently used ordering in the buffer picker and we would like to keep that. If anyrhing we should sort the bufferline the same as the buffer picker (altough there are some performance blockers for that right now).

@mkellyxp
Copy link

This is disappointing that this wasn't merged :( It seems like a pretty small change that wouldn't negatively impact size or performance of Helix, while giving a small but powerful update to people using it.

I added my thoughts on the discussion too. As a full time Helix user and supporter, I do hope this gets reconsidered in the future. Thanks Helix team for all you do, and thanks @masonj5n for doing the work to make this possible.

@DoctorRyner
Copy link

I think bufferline and gn/gp encouraged a more gui/mouse driven tab like workflow which motivated this featured

It is not, I have zero usages for mouse in helix but tabs are a faster way than space-b. How is it connected to mouse?

@adamcavendish
Copy link

I think bufferline and gn/gp encouraged a more gui/mouse driven tab like workflow which motivated this featured

It is not, I have zero usages for mouse in helix but tabs are a faster way than space-b. How is it connected to mouse?

I have similar usages too. I use next/previous buffer a lot to quickly switch between buffers. It's much faster than buffer picker (space-b) and I personally think reordering is a useful feature.

@DoctorRyner
Copy link

Yup, we don’t ask for drag&drop with mouse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buffer reordering
5 participants