When I scroll with the touch pad with two fingers in Visual Studio Code, I often scroll to the sides a little by accident. This is a bit annoying. I'd be happy to have it scroll only up and down.
To hide the horizontal scrollbar and prevent horizontal scrolling, use overflow-x: hidden: HTML. CSS.
Removing the scroll bar As of 2022, there is a Setting: Editor › Scrollbar: Vertical Scrollbar Size . I set it to 0 (zero) and the entire scrollbar column was no longer visible.
Scroll horizontally with the mouse wheel when holding the shift key. Enables horizontal scrolling by holding down the Shift key and spinning the mouse wheel in Visual Studio 2017, 2019 and 2022.
A partially satisfying solution, is to simply press Alt + z
, to have the lines wrapped, and then it doesn't scroll to the side. You can also make wordWrap default as described here How do I turn on text wrapping by default in VS Code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With