diff options
author | Federico Igne <undyamon@disroot.org> | 2024-01-22 23:42:56 +0100 |
---|---|---|
committer | Federico Igne <undyamon@disroot.org> | 2024-01-22 23:42:56 +0100 |
commit | 43bf616d8e58adf393762b13663cbff5ffb84ce3 (patch) | |
tree | c03243a14df68eaf44bba590d4bac15e61b60630 /lib/command.ml | |
parent | ee2c133e195e0326fcb5cecba723a5c12bdbba27 (diff) | |
download | sandy-43bf616d8e58adf393762b13663cbff5ffb84ce3.tar.gz sandy-43bf616d8e58adf393762b13663cbff5ffb84ce3.zip |
feat(mappings): Page Up/Down, Ctrl-F/B/D/U, Home, End
Diffstat (limited to 'lib/command.ml')
-rw-r--r-- | lib/command.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/command.ml b/lib/command.ml index a68c723..31e2ca2 100644 --- a/lib/command.ml +++ b/lib/command.ml | |||
@@ -53,6 +53,8 @@ let simple_movements = | |||
53 | Arrow_left; | 53 | Arrow_left; |
54 | Arrow_right; | 54 | Arrow_right; |
55 | Backspace; | 55 | Backspace; |
56 | End; | ||
57 | Home; | ||
56 | ] | 58 | ] |
57 | 59 | ||
58 | let to_scope = function | 60 | let to_scope = function |
@@ -60,8 +62,8 @@ let to_scope = function | |||
60 | | Key 'h' | Arrow_left | Backspace -> Left | 62 | | Key 'h' | Arrow_left | Backspace -> Left |
61 | | Key 'l' | Key ' ' | Arrow_right -> Right | 63 | | Key 'l' | Key ' ' | Arrow_right -> Right |
62 | | Key 'k' | Arrow_up -> Up | 64 | | Key 'k' | Arrow_up -> Up |
63 | | Key '0' -> To_bol | 65 | | Key '0' | Home -> To_bol |
64 | | Key '$' -> To_eol | 66 | | Key '$' | End -> To_eol |
65 | | _ -> failwith "Invalid motion." | 67 | | _ -> failwith "Invalid motion." |
66 | 68 | ||
67 | let is_simple_movement k = List.mem ~equal:Poly.equal simple_movements k | 69 | let is_simple_movement k = List.mem ~equal:Poly.equal simple_movements k |