Change default bindings for Up/Down in command mode

Those now look at the history again.
Looking at the behavior in different applications:

- vim: History
- spacemacs: Completion if open, else history
- luakit: Completion if open, else history
- dwb: Always completion (has no history?)
- vimb: Nothing if completion open, else history
- vimperator: Always history

So this is consistent with at least some of them - the much more important
factor is that <Tab> is probably intuitively easy to discover if up/down doesn't
do what's expected, but <ctrl-p>/<ctrl-n> are not.
This commit is contained in:
Florian Bruhin 2017-09-15 13:36:01 +02:00
parent f406e8d9ca
commit 7c39600508
2 changed files with 4 additions and 5 deletions

View File

@ -400,13 +400,13 @@ Default:
* +pass:[&lt;Ctrl-U&gt;]+: +pass:[rl-unix-line-discard]+
* +pass:[&lt;Ctrl-W&gt;]+: +pass:[rl-unix-word-rubout]+
* +pass:[&lt;Ctrl-Y&gt;]+: +pass:[rl-yank]+
* +pass:[&lt;Down&gt;]+: +pass:[completion-item-focus next]+
* +pass:[&lt;Down&gt;]+: +pass:[command-history-next]+
* +pass:[&lt;Escape&gt;]+: +pass:[leave-mode]+
* +pass:[&lt;Return&gt;]+: +pass:[command-accept]+
* +pass:[&lt;Shift-Delete&gt;]+: +pass:[completion-item-del]+
* +pass:[&lt;Shift-Tab&gt;]+: +pass:[completion-item-focus prev]+
* +pass:[&lt;Tab&gt;]+: +pass:[completion-item-focus next]+
* +pass:[&lt;Up&gt;]+: +pass:[completion-item-focus prev]+
* +pass:[&lt;Up&gt;]+: +pass:[command-history-prev]+
- +pass:[hint]+:
* +pass:[&lt;Ctrl-B&gt;]+: +pass:[hint all tab-bg]+

View File

@ -2026,13 +2026,12 @@ bindings.default:
passthrough:
<Ctrl-V>: leave-mode
command:
# FIXME:conf what to do about up/down?
<Ctrl-P>: command-history-prev
<Ctrl-N>: command-history-next
<Up>: command-history-prev
<Down>: command-history-next
<Shift-Tab>: completion-item-focus prev
<Up>: completion-item-focus prev
<Tab>: completion-item-focus next
<Down>: completion-item-focus next
<Ctrl-Tab>: completion-item-focus next-category
<Ctrl-Shift-Tab>: completion-item-focus prev-category
<Ctrl-D>: completion-item-del