Skip to content

Add buffer-close-next/previous commands - #15100

Open
maxsz wants to merge 1 commit into
helix-editor:masterfrom
maxsz:feature/buffer-close-next
Open

maxsz wants to merge 1 commit into
helix-editor:masterfrom
maxsz:feature/buffer-close-next

Conversation

@maxsz

@maxsz maxsz commented Jan 10, 2026 •

Copy link
Copy Markdown
Contributor

These commands close the buffers after/before the current buffer respectively. This is useful when using the bufferline feauture. It mimicks tab-like behavior as seen in other (mostly GUI) apps.

Other names I've considered:

  • buffer-close-all-next/-previous
  • buffer-close-forward/-backward
  • buffer-close-other-next/-previous

Here is an annotated screenshot from Helix:
helix-buffer-close-next

Here is an example from Safari.app:
safari-close-right

These commands close the buffers after/before the current buffer
respectively. This is useful when using the bufferline feauture. It
mimicks tab-like behavior as seen in other (mostly GUI) apps.
@Axlefublr

Copy link
Copy Markdown
Contributor

does this close the singular next buffer after the current one, or all the buffers after the current one?

@maxsz

maxsz commented Jan 10, 2026

Copy link
Copy Markdown
Contributor Author

does this close the singular next buffer after the current one, or all the buffers after the current one?

It closes all buffers after/before the current one. This is inspired by other apps that have this feature. I've updated the comment on the PR to make that more clear and show it visually.

I've also considered other names:
buffer-close-all-next/-previous
buffer-close-forward/-backward
buffer-close-other-next/-previous

@Axlefublr

Copy link
Copy Markdown
Contributor

nice thank you! I love the clarification. pretty awesome feature, then; I used to use this all the way back in vscode.

@Axlefublr

Copy link
Copy Markdown
Contributor

I'm leaning the heaviest towards buffer-close-all-next. Without all in the name, it's too easy to think that the action only closes the immediate next buffer and nothing else, so the user might see this action and think “well that's useless” and never even try it.

This branch has not been deployed

No deployments
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.

3 participants