Page Up and Page Down in zed editor scroll the document up and down but do not bring the cursor along. In this article, you see how to change that behavior.

Make Page Up and Page Down move the cursor in Zed editor.

To move the cursor a page up and down, you have to use SHIFT-PAGE-UP and SHIFT-PAGE-DOWN by default. If you want to scroll a page up and down and move the cursor, you can change the key bindings.

[
  {
    "context": "Editor",
    "bindings": {
      "pageup": "editor::MovePageUp",
      "pagedown": "editor::MovePageDown"
    }
  }
]

Open a large document and use Page Up and Page Down to move the cursor up and down.

More Key Bindings

The Zed Editor documentation shows a link to a default.json file, where you can see all default key bindings.

Written by Loek van den Ouweland on 2023-11-01.
Questions regarding this artice? You can send them to the address below.