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: Add function/class search shortcut, menu and toolbar entries #3878

Merged
merged 11 commits into from
Jan 10, 2017

Conversation

andfoy
Copy link
Member

@andfoy andfoy commented Dec 22, 2016

Fixes #3855

@andfoy andfoy changed the title Add fuzzy function/class search shortcut PR: Add fuzzy function/class search shortcut Dec 22, 2016
@@ -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
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

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?

Copy link
Member

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)
Copy link
Member

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",
Copy link
Member

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

  1. If Spyder has no project active, the Project explorer is empty.
  2. If the project is active, I think users would expect the Project explorer to be visible all the time.

@goanpeca, what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed!

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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 :-)

@ccordoba12 ccordoba12 added this to the v3.1 milestone Jan 5, 2017
@ccordoba12
Copy link
Member

I really like this!! Nice job at adding a menu and toolbar entries for this action 👍 :-)

@ccordoba12 ccordoba12 changed the title PR: Add fuzzy function/class search shortcut PR: Add function/class search shortcut, menu and toolbar entries Jan 10, 2017
@ccordoba12 ccordoba12 merged commit 138bd23 into spyder-ide:3.x Jan 10, 2017
ccordoba12 added a commit that referenced this pull request Jan 10, 2017
@andfoy andfoy deleted the symbolfindershort branch January 10, 2017 16:44
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.

4 participants