nushell icon indicating copy to clipboard operation
nushell copied to clipboard

Change keybonding for hint complete

Open rakula4 opened this issue 3 years ago • 2 comments

Question

Currently the hint completion is done with the right arrow key. I want to change that to use tab.

How does one set up this in config.nu file?

Additional context and details

No response

rakula4 avatar Oct 25 '22 14:10 rakula4

if you look at keybindings default you will see that right is in an until with historyhintcomplete, menuright and right. you may be able to follow one of the other examples that uses until in the default_config.nu to try and figure this out.

fdncred avatar Oct 25 '22 14:10 fdncred

Looks like this works:

  keybindings: [
      {
          name: tab_history_completion
          modifier: none
          keycode: tab
          mode: [ emacs, vi_insert, vi_normal ]
          event: {
              until: [
                  { send: historyhintcomplete }
                  { send: menuright }
                  { send: right }
              ]
          }
      }
  ]

siph avatar Nov 03 '22 12:11 siph