on master help sign in
Add arrow keys to view mode (#987)

* Add arrow keys to view mode * Drop C-up and C-down * Update docs for #987 * Format correctly * Drop other keymaps * Correct keymap.md * Add arrow keys to view mode Drop C-up and C-down Update docs for #987 Format correctly Drop other keymaps Correct keymap.md Rebase Co-authored-by: Rust & Python <nexinov@localhost.gud-o15> Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

commit187197afb15ae13764fc2cdde87528324e183983 authorNexiNov <82087036+python128@users.noreply.github.com> dateFri 12 Nov 2021, 06:18 (5 years ago) parentbf95a9e
2 files changed+16−16
book/src/keymap.md+12−12 helix-term/src/keymap.rs+4−4
book/src/keymap.md+12−12
@@ -128,18 +128,18 @@ key to return to normal mode after usage (useful when you're simply looking
128128over text and not actively editing it).
129129
130130
131−| Key | Description | Command |
132−| ----- | ----------- | ------- |
133−| `z` , `c` | Vertically center the line | `align_view_center` |
134−| `t` | Align the line to the top of the screen | `align_view_top` |
135−| `b` | Align the line to the bottom of the screen | `align_view_bottom` |
136−| `m` | Align the line to the middle of the screen (horizontally) | `align_view_middle` |
137−| `j` | Scroll the view downwards | `scroll_down` |
138−| `k` | Scroll the view upwards | `scroll_up` |
139−| `f` | Move page down | `page_down` |
140−| `b` | Move page up | `page_up` |
141−| `d` | Move half page down | `half_page_down` |
142−| `u` | Move half page up | `half_page_up` |
131+| Key | Description | Command |
132+| ----- | ----------- | ------- |
133+| `z` , `c` | Vertically center the line | `align_view_center` |
134+| `t` | Align the line to the top of the screen | `align_view_top` |
135+| `b` | Align the line to the bottom of the screen | `align_view_bottom` |
136+| `m` | Align the line to the middle of the screen (horizontally) | `align_view_middle` |
137+| `j` , `down` | Scroll the view downwards | `scroll_down` |
138+| `k` , `up` | Scroll the view upwards | `scroll_up` |
139+| `f` | Move page down | `page_down` |
140+| `b` | Move page up | `page_up` |
141+| `d` | Move half page down | `half_page_down` |
142+| `u` | Move half page up | `half_page_up` |
143143
144144#### Goto mode
145145
helix-term/src/keymap.rs+4−4
@@ -651,8 +651,8 @@ impl Default for Keymaps {
651651 "t" => align_view_top,
652652 "b" => align_view_bottom,
653653 "m" => align_view_middle,
654− "k" => scroll_up,
655− "j" => scroll_down,
654+ "k" | "up" => scroll_up,
655+ "j" | "down" => scroll_down,
656656 "C-b" | "pageup" => page_up,
657657 "C-f" | "pagedown" => page_down,
658658 "C-u" => half_page_up,
@@ -663,8 +663,8 @@ impl Default for Keymaps {
663663 "t" => align_view_top,
664664 "b" => align_view_bottom,
665665 "m" => align_view_middle,
666− "k" => scroll_up,
667− "j" => scroll_down,
666+ "k" | "up" => scroll_up,
667+ "j" | "down" => scroll_down,
668668 "C-b" | "pageup" => page_up,
669669 "C-f" | "pagedown" => page_down,
670670 "C-u" => half_page_up,