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

Add Switch to Next/Prev Split or Tab command #995

Merged
merged 4 commits into from
Mar 2, 2025
Merged

Conversation

vlabo
Copy link
Contributor

@vlabo vlabo commented Feb 28, 2025

This PR add two new commands

    /// Select next split if available if not next tab
    SelectNextSplitOrTab,
    /// Select previous split if available if not previous tab
    SelectPrevSplitOrTab,

This allows to switch between splits and tabs with single key binding.

I understand if you dont want to merge this and leave it for the plugin system, when available.
Thanks for making this great software.

@raphamorim
Copy link
Owner

Hey @vlabo thanks for the PR,

It does make sense! Could you update the docs folder regarding it: https://rioterm.com/docs/key-bindings#split-actions

@@ -570,6 +570,32 @@ impl<T: EventListener + Clone + std::marker::Send + 'static> ContextManager<T> {
self.current_route = self.current().route_id;
}

#[inline]
pub fn switch_to_next_split_or_tab(&mut self) {
Copy link
Owner

Choose a reason for hiding this comment

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

everything looks good, could you just add one test for next and prev so we make sure it always work 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks for the patience.

@raphamorim
Copy link
Owner

Thank you for updating the docs @vlabo 🙏

Copy link
Owner

@raphamorim raphamorim left a comment

Choose a reason for hiding this comment

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

Nice! thank you @vlabo and thanks for the sponsorship too, I appreciate 🙏

@raphamorim raphamorim merged commit 0e33b2f into raphamorim:main Mar 2, 2025
7 checks passed
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.

2 participants