Skip to content

bmalehorn/vscode-scroll-viewport

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

📜🖥 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
scrollViewport.cursorFollowsViewport true When true, cursor will stay inside the viewport instead of scrolling off the screen

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