Skip to content

Commit

Permalink
Support S-Tab to move up completion cursor in vi-mode on Unix
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Sep 19, 2021
1 parent cbacb4c commit ff278cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/reline/ansi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ def self.set_default_key_bindings(config)
config.add_default_key_binding_by_keymap(:vi_insert, key, func)
config.add_default_key_binding_by_keymap(:vi_command, key, func)
end
{
[27, 91, 90] => :completion_journey_up, # S-Tab
}.each_pair do |key, func|
config.add_default_key_binding_by_keymap(:emacs, key, func)
config.add_default_key_binding_by_keymap(:vi_insert, key, func)
end
{
# default bindings
[27, 32] => :em_set_mark, # M-<space>
[24, 24] => :em_exchange_mark, # C-x C-x
[27, 91, 90] => :completion_journey_up, # S-Tab
}.each_pair do |key, func|
config.add_default_key_binding_by_keymap(:emacs, key, func)
end
Expand Down

0 comments on commit ff278cd

Please sign in to comment.