Skip to content

Commit

Permalink
Add extra shortcuts for builtins
Browse files Browse the repository at this point in the history
- input_go_word_left: alt-b
- input_go_word_right: alt-f
- line_down: ctrl-j
- line_up: ctrl-k
- panel_left_no_open: ctrl-h
- panel_right_no_open: ctrl-h
  • Loading branch information
9999years committed Oct 9, 2023
1 parent a201d80 commit e18adcf
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/verb/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,20 @@ pub fn builtin_verbs() -> Vec<Verb> {
internal(input_go_left).no_doc(),
internal(input_go_right).no_doc(),
internal(input_go_to_start).with_key(key!(home)).no_doc(),
internal(input_go_word_left).no_doc(),
internal(input_go_word_right).no_doc(),
internal(input_go_word_left).with_key(key!(alt-b)).no_doc(),
internal(input_go_word_right).with_key(key!(alt-f)).no_doc(),

// arrow keys bindings
internal(back).with_key(key!(left)),
internal(open_stay).with_key(key!(right)),
internal(line_down).with_key(key!(down)).with_key(key!('j')),
internal(line_up).with_key(key!(up)).with_key(key!('k')),
internal(line_down)
.with_key(key!(down))
.with_key(key!('j'))
.with_key(key!(ctrl-j)),
internal(line_up)
.with_key(key!(up))
.with_key(key!('k'))
.with_key(key!(ctrl-k)),

//
internal(set_syntax_theme),
Expand Down Expand Up @@ -241,9 +247,11 @@ pub fn builtin_verbs() -> Vec<Verb> {
.with_key(key!(ctrl-u))
.with_key(key!(pageup)),
internal(panel_left_no_open)
.with_key(key!(ctrl-left)),
.with_key(key!(ctrl-left))
.with_key(key!(ctrl-h)),
internal(panel_right)
.with_key(key!(ctrl-right)),
.with_key(key!(ctrl-right))
.with_key(key!(ctrl-l)),
internal(print_path).with_shortcut("pp"),
internal(print_relative_path).with_shortcut("prp"),
internal(print_tree).with_shortcut("pt"),
Expand Down

0 comments on commit e18adcf

Please sign in to comment.