patrick
patrick

Reputation: 4852

Fast text scrolling in VS Code

I am testing out Visual Studio Code on macOS, and was wondering if there is a key combination for faster scrolling?

I would need this, for example, to go quickly from an early part of the code to a part towards the end of the file.

e.g. in Emacs when I hold up/down-arrow and hit Ctrl, the scroll speed increases noticeably; VS Code actually stops scrolling with the same command. Cmd+arrow will get me to the start / end of the file, but I could not find a combination that merely speeds things up and nothing in the keyboard shortcuts looked helpful.

Version is 1.21.1.

Upvotes: 37

Views: 41766

Answers (6)

Maddy Guthridge
Maddy Guthridge

Reputation: 1999

The Scroll Faster extension overrides the Ctrl+Up/Down shortcuts to scroll by a user-defined number of lines, rather than VS Code's default of 1. It also adds an option to allow the cursor to be "dragged along" if using the shortcut would cause it to go off-screen.

You can install it by pasting ext install EnkelDigital.scroll-faster into the quick switcher (Ctrl/Cmd+P).

Upvotes: 1

Mark
Mark

Reputation: 180631

There is

"editor.mouseWheelScrollSensitivity": 1,  // or any number

You can scroll by pages too:

PageDown or PageUp

Upvotes: 39

joematune
joematune

Reputation: 2040

in Emacs when I hold up/down-arrow [...]

The OP mentioned key strokes as opposed to mouse scrolling.

My solution was at an OS level, i.e. lessen the Key Repeat and Delay Until Repeat settings so that holding the up / down arrows will scroll much quicker.

Important note: This setting will update all key presses regardless of the app.


If on OSX, this setting can be found in System Preferences under Keyboard, or overwritten directly in the terminal. The following will take effect after a system reboot.

defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)

Upvotes: 3

Leandro
Leandro

Reputation: 331

Go to File > Preferences > Settings. Search for: mouseWheelScrollSensitivity, change it for 0.01

Upvotes: 23

nachocab
nachocab

Reputation: 14364

Update: Since v1.31 you can now press Alt to enable fast scrolling. It works by activating editor.fastScrollSensitivity.

Upvotes: 59

Matt
Matt

Reputation: 35203

It is not available, but is an open issue. You can follow the progress here:

https://github.com/Microsoft/vscode/issues/24344

Upvotes: 1

Related Questions