-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
keyboard shortcut for tab switching #1677
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fantastic work! There are a few small adjustments we need to make in order to merge this.
These keyboard shortcuts should probably be associated with menu items instead of empty buttons...
- Navigate > Show Previous Tab
- Navigate > Show Next Tab
These currently exist but are disabled so all you should need to do is hook them up to the functions you wrote.
We also need to make sure that this is only applied to the focused editor and not applied to all open editors if the user has a split editor layout.
Thanks so much for all the feedback and sorry for the incredibly janky initial workaround. I just fixed the menu bar implementation by adding an extension to the editor with the functions I made and using those in the NavigateCommands. Because NavigateCommands uses @FocusedObject, it only tabs the focused split now. Tell me if you want anything else changed or fixed and thanks again for the feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! ✅
Edit: Please fix the SwiftLint errors.
SwiftLint errors all fixed 👍 |
@allcontributors add @knotbin for code |
I've put up a pull request to add @knotbin! 🎉 |
Description
The following keyboard shortcuts are now implemented:
CMD + SHIFT + ] to go to the next tab or, if the user is on the last tab, wrap around to the first tab
CMD + SHIFT + [ to go to the previous tab or, if the user is on the first tab, wrap around to the last tab
Related Issues
Checklist
Screenshots