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

PR: Allow tab cycling shortcuts to be configurable in Editor #6123

Merged
merged 1 commit into from
Jan 4, 2018

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Jan 4, 2018

Fixes #4842.

  • Added shortcuts to cycle through files.
  • If statement to convert Backtab to Shift+Tab was only for 'nt', but problem existed on linux too, so removed the conditional.
  • Tab navigation routine already existed in Tabs class, so moved it to BaseTabs class for it to be used in the editor (which creates a BaseTabs widget) without affecting existing code (like in iPython console).

@ccordoba12 ccordoba12 added this to the v3.2.6 milestone Jan 4, 2018
@@ -385,6 +385,16 @@ def keyPressEvent(self, event):
handled = True
if not handled:
QTabWidget.keyPressEvent(self, event)

def tab_navigate(self, delta=1):
Copy link
Member

Choose a reason for hiding this comment

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

@csabella, Ctrl+Tab is handled differently in the Editor, because there we show a dialog to select among the current opened files. So I think you need to revert this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ccordoba12 It still works correctly in the Editor even with moving this. Without changing preferences, Ctrl+Tab brings up the dialog to select the file in MRU order and Ctrl+PgDown cycles through the files. But, this code allows those keys to be configurable.

Copy link
Member

@ccordoba12 ccordoba12 Jan 4, 2018

Choose a reason for hiding this comment

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

Ok, great! Then this is ready.

@ccordoba12 ccordoba12 modified the milestones: v3.2.6, v3.2.7 Jan 4, 2018
@ccordoba12 ccordoba12 changed the title PR: Allow tab cycling shortcut to be configurable in editor PR: Allow tab cycling shortcuts to be configurable in Editor Jan 4, 2018
@ccordoba12 ccordoba12 merged commit 5dccd0e into spyder-ide:3.x Jan 4, 2018
ccordoba12 added a commit that referenced this pull request Jan 4, 2018
@csabella csabella deleted the issue4842 branch January 7, 2018 17:54
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