Skip to content

Instantly share code, notes, and snippets.

@timc1
Last active May 8, 2024 21:46
Show Gist options
  • Save timc1/efb77d639d05030d9b112fd6228846a4 to your computer and use it in GitHub Desktop.
Save timc1/efb77d639d05030d9b112fd6228846a4 to your computer and use it in GitHub Desktop.

This emulate's vim's <C-e> and <C-y> for scrolling in VSCode using the macros extension.

scrolling vscode editor

  1. add the following to settings.json
"macros": {
  "scrollLineDownFaster": [
    "scrollLineDown",
    "scrollLineDown",
    "scrollLineDown",
    "scrollLineDown"
  ],
  "scrollLineUpFaster": [
    "scrollLineUp",
    "scrollLineUp",
    "scrollLineUp",
    "scrollLineUp"
  ]
}
  1. Install the macros extension

  2. ⌘K + ⌘S to bring up Keyboard Shortcuts and search for scrollLine

  3. Bind ctrl+e to macros.scrollLineUpFaster & ctrl+y to macros.scrollLineDownFaster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment