summaryrefslogtreecommitdiff
path: root/helix-term/src/keymap/default.rs
diff options
context:
space:
mode:
authorAlexanderDickie2024-02-18 23:13:04 +0000
committerGitHub2024-02-18 23:13:04 +0000
commit9ab3f9d01a8ea4967f5a7e64a3f6c8f350674c18 (patch)
treef6b5fdbf1c7924584ecbc975591138def7ce16f8 /helix-term/src/keymap/default.rs
parent64326698225999016300423c4b90f8a8c7b8f38b (diff)
Scroll cursor and page together (neovim-like scrolling) (#8015)
* neovim like scroll function * clear line annotations outside of move_vertically/_visual * add nvim scroll function to commands * assign nvim-scroll to C-d and C-u (half page scrolls) * dont remove backspace and space mapping * move non-softwrap logic to seperate function, call this in nvim-scroll fn * Revert "move non-softwrap logic to seperate function, call this in nvim-scroll fn" This reverts commit e4905729c338a2260e6981f1d8fac022897b4191. * Revert "clear line annotations outside of move_vertically/_visual" This reverts commit 1df3fefe55afc840d1ab5094b2116d1127fc363f. * add TODO for when inline diagnostics gets merged * move nvim-scroll logic into scroll(), dont respect scrolloff * run cargo fmt * run cargo clippy * update documenation for Ctrl-d and Ctrl-u remap
Diffstat (limited to 'helix-term/src/keymap/default.rs')
-rw-r--r--helix-term/src/keymap/default.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs
index 763ed4ae..92d6b590 100644
--- a/helix-term/src/keymap/default.rs
+++ b/helix-term/src/keymap/default.rs
@@ -178,8 +178,8 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"esc" => normal_mode,
"C-b" | "pageup" => page_up,
"C-f" | "pagedown" => page_down,
- "C-u" => half_page_up,
- "C-d" => half_page_down,
+ "C-u" => page_cursor_half_up,
+ "C-d" => page_cursor_half_down,
"C-w" => { "Window"
"C-w" | "w" => rotate_view,
@@ -287,8 +287,8 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"j" | "down" => scroll_down,
"C-b" | "pageup" => page_up,
"C-f" | "pagedown" => page_down,
- "C-u" | "backspace" => half_page_up,
- "C-d" | "space" => half_page_down,
+ "C-u" | "backspace" => page_cursor_half_up,
+ "C-d" | "space" => page_cursor_half_down,
"/" => search,
"?" => rsearch,
@@ -304,8 +304,8 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"j" | "down" => scroll_down,
"C-b" | "pageup" => page_up,
"C-f" | "pagedown" => page_down,
- "C-u" | "backspace" => half_page_up,
- "C-d" | "space" => half_page_down,
+ "C-u" | "backspace" => page_cursor_half_up,
+ "C-d" | "space" => page_cursor_half_down,
"/" => search,
"?" => rsearch,