spyder icon indicating copy to clipboard operation
spyder copied to clipboard

Scroll horizontally with Shift + mouse wheel

Open Justinas365 opened this issue 4 years ago • 10 comments

Problem Description

Would you be able to include horizontal scroll with Shift+mousewheel.

This feature is in VS Code or SAS and it helps to review either the code if the line is long or view DataFrame with lots of columns

Versions

  • Spyder version: 4.2.0
  • Python version: 3.8
  • Qt version: 4.7.7
  • PyQt version:
  • Operating System name/version: Windows 10

Justinas365 avatar Jan 05 '21 19:01 Justinas365

Hey @Justinas365, thanks for reporting and sorry for the delay in coming back to you. Could you post a screenshot of what you mean by your request? Thanks!

ccordoba12 avatar Jan 18 '21 16:01 ccordoba12

Hello, sorry for my late reply.

So the image below contains a long line. At the bottom you can see that a horizontal scroll bar appeared. It would be really handy if I could scroll left or right when I click Shift and then spin a mouse wheel either up or down.

I think this feature would be particularly when exploring DataFrames in variable explorer. Imagine if you had 200 columns, it would be a lot more precise and faster to scroll horizontally with Shift and mouse wheel up and down instead of grabbing horizontal bar with a bouse and dragging it.

This is a feature I always use in SAS.

I understand this is not a must as there are other outstanding issues to fix so not something to worry too much.

Thank you

image

Justinas365 avatar Jan 30 '21 16:01 Justinas365

Currently, pressing Shift + mouse wheel up/down is already used to jump up/down code (every move of the wheel skips around 50 lines up/down in my version).

However, seeing that the mouse wheel is already used to scroll vertically up/down code, it seems more intuitive to assign Shift + mouse wheel to scroll horizontally left/right instead of still moving up/down code (even if in larger chunks), and I can't find an option to change it.

This is also how Google Colab works...having gotten used to it, I always get annoyed when I use Shift + mouse wheel in Spyder to view a long line but instead end up jumping down 50 lines.

As @Justinas365 mentioned, this is not a major issue, but it would be nice to have.

cnpgs avatar May 16 '21 15:05 cnpgs

Unfortunately, Shift + mouse wheel is already used to do zoom in/out. Do you have other suggestions?

ccordoba12 avatar May 17 '21 02:05 ccordoba12

Unfortunately, Shift + mouse wheel is already used to do zoom in/out. Do you have other suggestions?

As mentioned, at least in my case, Shift + mouse wheel scrolls up/down code in larger jumps; it is Ctrl + mouse wheel that does zoom in/out.

Is it not possible to let the user change their behaviour, similar to how the key bindings can be changed in Tools > Preferences > Keyboard shortcuts?

cnpgs avatar May 17 '21 08:05 cnpgs

No, it's not possible right now. We have to implement that functionality first.

ccordoba12 avatar May 17 '21 13:05 ccordoba12

Horizontal scrolling with shift + mouse wheel is the default in macOS and Linux. In this sense, the Spyder editor deviates from the unofficial norm.

cirnod avatar Jun 25 '21 13:06 cirnod

For anyone who is also affected by this issue, I have noticed that there is a work-around until (maybe) this is resolved - if you move your mouse/cursor on to the horizontal scroll bar and use the mouse wheel, you will be able to scroll horizontally.

IMO still not as convenient as pressing Shift + mouse wheel (because you don't have to move your mouse and ensure it is placed directly on the horizontal scroll bar)...but it might be just enough for some.

cnpgs avatar Jun 30 '21 14:06 cnpgs

@Justinas365, you can use alt + mousewheel in spyder IDE, if you are stuck till now. I just saw this issue.😅😅

piyush0431 avatar May 09 '24 14:05 piyush0431

use Alt + mouse scroll That should do the job for you.

GMLabGitHub avatar Jul 14 '24 17:07 GMLabGitHub