Skip to content

:buffer-nth command - #13650

Open
Axlefublr wants to merge 1 commit into
helix-editor:masterfrom
Axlefublr:Axlefublr/buffer_nth
Open

:buffer-nth command#13650
Axlefublr wants to merge 1 commit into
helix-editor:masterfrom
Axlefublr:Axlefublr/buffer_nth

Conversation

@Axlefublr

Copy link
Copy Markdown
Contributor

Say I have 5 buffers open currently.
My usecase is to have hotkeys where ctrl+1 goes to the first one, ctrl+2 goes to the second one, … ctrl+0 goes to the last one. Kinda like in a browser!
This will aid a more buffer-closey approach, along with the :buffer-next & :buffer-previous commands, as due to helix not having live buffer reloading, closing buffers aggressively is a good idea.

My first thought was to have the user simply provide a negative number to count from the end, but that results in them having to -- -1. -r 1 is slightly nicer.

@leonlonsdale

Copy link
Copy Markdown

Using a bufferline makes having hotkeys for this command even more useful. Tmux uses a similar approach so this would fit neatly into my workflow without needing any brain power for adjustment.

@Axlefublr
Axlefublr force-pushed the Axlefublr/buffer_nth branch from b085918 to a078a1a Compare June 14, 2025 16:33
Comment thread helix-term/src/commands/typed.rs Outdated
Comment thread helix-term/src/commands/typed.rs Outdated
@Axlefublr
Axlefublr force-pushed the Axlefublr/buffer_nth branch from 6c0863d to 6088eae Compare September 1, 2026 13:16
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.

4 participants