Skip to content

Add keybindings to go to previous and next file. #546

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lathan1623
Copy link

CTRL-Page Up/CTRL-Page Down keybindings for navigating to next/previous open files.
Fixes #530

@lathan1623

This comment was marked as resolved.

pub fn activate_next(&mut self) {
if self.list.len() > 1 {
if let Some(doc) = self.list.pop_front() {
self.list.push_back(doc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Items in the list are sorted from most to least recently activated. This would mark the current document as the least recent one, but it's actually the 2nd most recent one. But the next call to activate_next would then need to swap the 2nd and 3rd items, and so on.

I believe this shows that we need a "tab order". Given that we currently have neither tabs nor the ability to reorder them, I'm not sure whether this can be implemented.

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.

[feature] Add nano's "ALT+<" and "ALT+>" key-bindings for file switching.
2 participants