Add keyboard shortcuts to center scrolling around current line (#14385)

Peter Tripp created

- MacOS: Center the cursor in the visible area. `ctrl-l` (matches MacOS)
- Linux JetBrains: Scroll so cursor is at the Middle `ctrl-m`
- `editor::NextScreen` is not longer bound in any keymap by default (was
`ctrl-l` on MacOS)

Fixes #5247

Change summary

assets/keymaps/default-macos.json   | 2 +-
assets/keymaps/linux/jetbrains.json | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

Detailed changes

assets/keymaps/default-macos.json 🔗

@@ -83,7 +83,7 @@
       "ctrl-n": "editor::MoveDown",
       "ctrl-b": "editor::MoveLeft",
       "ctrl-f": "editor::MoveRight",
-      "ctrl-l": "editor::NextScreen",
+      "ctrl-l": "editor::ScrollCursorCenter",
       "alt-left": "editor::MoveToPreviousWordStart",
       "alt-b": "editor::MoveToPreviousWordStart",
       "alt-right": "editor::MoveToNextWordEnd",

assets/keymaps/linux/jetbrains.json 🔗

@@ -13,6 +13,7 @@
       "ctrl-shift-j": "editor::JoinLines",
       "ctrl-d": "editor::DuplicateLineDown",
       "ctrl-y": "editor::DeleteLine",
+      "ctrl-m": "editor::ScrollCursorCenter",
       "ctrl-pagedown": "editor::MovePageDown",
       "ctrl-pageup": "editor::MovePageUp",
       // "ctrl-alt-shift-b": "editor::SelectToPreviousWordStart",