-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: Add function/class search shortcut, menu and toolbar entries #3878
Conversation
@@ -318,7 +318,8 @@ _/debug step into = Ctrl+F11 | |||
_/fullscreen mode = F11 | |||
editor/toggle comment = Ctrl+1 | |||
editor/go to definition = Ctrl+G | |||
editor/show/hide project explorer = Ctrl+Alt+P | |||
editor/show/hide project explorer = Ctrl+Alt+J | |||
_/symbol finder = Ctrl+Alt+P | |||
_/debug step return = Ctrl+Shift+F11 |
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.
@ccordoba12 I thought we were supposed to not touch these files?
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.
Sorry! I thought that file should be modified because a default shortcut was altered and a new one was introduced in this PR
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.
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.
So, should I remove those edits?
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.
Yep
icon=ima.icon('symbol_find'), | ||
tip=_('Fast symbol search in file'), | ||
triggered=self.call_symbol_finder, | ||
context=Qt.ApplicationShortcut) |
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.
Not saying you should change this, just a comment for reference.
# I tend to favor this one for several reasons.
# It can be automatically performed and enforced by tools like yapf
# it results in more lines of code but ir more readable as each line corresponds
# to a parameter
self.symbol_finder_action = create_action(
self,
_('Symbol finder...'),
icon=ima.icon('symbol_find'),
tip=_('Fast symbol search in file'),
triggered=self.call_symbol_finder,
context=Qt.ApplicationShortcut)
# or
self.symbol_finder_action = create_action(self,
_('Symbol finder...'),
icon=ima.icon('symbol_find'),
tip=_('Fast symbol search in file'),
triggered=self.call_symbol_finder,
context=Qt.ApplicationShortcut)
@@ -426,7 +427,7 @@ | |||
'editor/run cell and advance': RUN_CELL_AND_ADVANCE_SHORTCUT, | |||
# -- In plugins/editor.py | |||
'editor/show/hide outline': "Ctrl+Alt+O", | |||
'editor/show/hide project explorer': "Ctrl+Alt+P", |
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.
I think this shortcut is no more needed because
- If Spyder has no project active, the Project explorer is empty.
- If the project is active, I think users would expect the Project explorer to be visible all the time.
@goanpeca, what do you think?
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.
Agreed!
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.
Ok, then @andfoy please remove this shortcut as part of this PR.
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.
If the project is active, I think users would expect the Project explorer to be visible all the time.
I don't mind that much about the shortcut, but I don't expect the Project explorer to be visible all the time. I actually close the Project explorer when working on my laptop because the screen is not big enough, and I find it pretty annoying that it always comes back when I launch Spyder. Even on my desktop screen, which is big enough, I don't find the Project explorer particularly useful - I only use it when opening files.
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.
Well, the Project Explorer can be closed at any time, so it's not enforced on users. It's just a visual clue that you're working on a project.
I find it pretty annoying that it always comes back when I launch Spyder
Please submit a PR to fix that. I don't have a problem with it :-)
I really like this!! Nice job at adding a menu and toolbar entries for this action 👍 :-) |
Fixes #3855