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

keyboard-shortcuts to toggle panes #46

Open
2 tasks done
raphaelquast opened this issue Apr 27, 2021 · 4 comments
Open
2 tasks done

keyboard-shortcuts to toggle panes #46

raphaelquast opened this issue Apr 27, 2021 · 4 comments

Comments

@raphaelquast
Copy link

Issue Report Checklist

Problem Description

... not a problem... a feature request 🙂

Right now, the keyboard-shortcuts crtl + shift + ( O, F etc.) can be used to "show" or "switch-to" the individual panes ("outline", "find", etc.)

I think it would be very nice if there are additional shortcuts (how about alt + shift + (O, F etc.) ) that allow to toggle (e.g. show or hide) the corresponding panels!

a quick use-case might be:

  • I usually have the outline to the left of my window, the editor in the middle and a split of console + help on the right.
  • now most of the time I don't actually need to see the outline, but right now i can only close the panel by explicitly
    selecting it and then pressing crtl + shift + F4 (or closing it with the mouse)
    ... a single shortcut to toggle the outline would be really helpful!
@steff456
Copy link
Member

Hi @raphaelquast,

This is a very good idea! Right now I'm going to move this issue to the ux repository were we are discussing all the new feature requests with the whole team. This feature request is going to be in the low priority list for us for now, so I encourage you to contribute to the project with this idea. We can give all the guidance you need.

Thanks for reporting!

@steff456 steff456 transferred this issue from spyder-ide/spyder Apr 27, 2021
@raphaelquast
Copy link
Author

hey, even though I know my way around python, I doubt that i find the time to implement this myself....
nevertheless, can you point me to the right direction (e.g. the files where your shortcuts are implemented) so that in case I get motivated I can have a look?

@steff456
Copy link
Member

steff456 commented May 1, 2021

Hi @raphaelquast,

Sure I can encourage you to contribute with this feature! First, please go to the contributing guide (https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md) to set up your environment, in case you prefer to follow a video I can also link it here: https://www.youtube.com/watch?v=GizipMT1LvQ

Once you can run Spyder using python bootstrap.py you will be able to start making changes and test them in the development mode.

For this particular enhancement, you will need to make changes in the base of Spyder's plugin API. In particular, you will need to add an action in the file spyder/api/widgets/main_widget.py beneath the definition of self.toggle_view_action in line 352. The definition is going to be pretty similar to self.toggle_view_action, but in the name it will be called "hide " + self._name and the action performed will be linked to close the plugin.

After this, you will be able to do changes under the file spyder/config/main.py in the dictionary where the key is shortcuts. In there you will need to define the new shortcuts for hiding all the panes as is the case right now for all the "switch to X".

Hope this helps you to start your first PR and if I can help you in something else please let me know.

@raphaelquast
Copy link
Author

@steff456
thanks! yep that looks like all I need to get this thing done... now all that's left to find is a bit of time to actually do it 😄
I'll let you know once I found some time to have a look!

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

No branches or pull requests

2 participants