mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 08:50:05 +02:00
Consistent default key bindings for ide_completion_menu (#13955)
Updates Ctrl+p to open the ide_completion menu and otherwise advance to the "previous" menu item. Ctrl+n opens the ide_completion_menu and subsequently advances to the "next" menu item. Ctrl+p should share this behavior for the "previous" menu item. See nushell/nushell#13946 for detailed discussion. Tested by building and running nushell without a custom config, falling back to this default config.
This commit is contained in:
@ -403,10 +403,17 @@ $env.config = {
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: completion_previous_menu
|
||||
modifier: shift
|
||||
keycode: backtab
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menuprevious }
|
||||
}
|
||||
{
|
||||
name: ide_completion_menu
|
||||
modifier: control
|
||||
keycode: char_n
|
||||
keycode: space
|
||||
mode: [emacs vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
@ -430,13 +437,6 @@ $env.config = {
|
||||
mode: [emacs, vi_insert, vi_normal]
|
||||
event: { send: menu name: help_menu }
|
||||
}
|
||||
{
|
||||
name: completion_previous_menu
|
||||
modifier: shift
|
||||
keycode: backtab
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menuprevious }
|
||||
}
|
||||
{
|
||||
name: next_page_menu
|
||||
modifier: control
|
||||
@ -618,6 +618,18 @@ $env.config = {
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { edit: movetolineend }
|
||||
}
|
||||
{
|
||||
name: move_down
|
||||
modifier: control
|
||||
keycode: char_n
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menudown }
|
||||
{ send: down }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_up
|
||||
modifier: control
|
||||
@ -630,18 +642,6 @@ $env.config = {
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_down
|
||||
modifier: control
|
||||
keycode: char_t
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menudown }
|
||||
{ send: down }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_backward
|
||||
modifier: none
|
||||
|
Reference in New Issue
Block a user