Skip to content

bmalehorn/vscode-scroll-viewport

Repository files navigation

📜🖥 Scroll Viewport

version number install count

When you scroll with the mouse, it moves the viewport up and down without moving the cursor.

Scroll Viewport adds keybindings for that behavior:

keybinding command
Ctrl+Down / Cmd+Down scroll down
Ctrl+Up / Cmd+Up scroll up

Extension Settings

name default effect
scrollViewport.lines 10 How many lines to scroll up / down

editorScroll

VSCode already has a similar built-in command called editorScroll:

[
  {
    "key": "ctrl+down",
    "command": "editorScroll",
    "when": "textInputFocus",
    "args": {
      "to": "down",
      "by": "line",
      "revealCursor": true,
      "value": 10
    }
  },

  {
    "key": "ctrl+up",
    "command": "editorScroll",
    "when": "textInputFocus",
    "args": {
      "to": "up",
      "by": "line",
      "revealCursor": true,
      "value": 10
    }
  }
]

ScrollViewport exists to address a few editorScroll problems:

  1. editorScroll gets stuck if you use code folding
  2. editorScroll won't preserve & expand your selection

Similar Projects

About

Move the screen up and down, like with your mouse

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published