blink.cmp icon indicating copy to clipboard operation
blink.cmp copied to clipboard

Navigate cmdline history while completion menu is open

Open chancez opened this issue 3 months ago • 3 comments

Feature Description

Normally in the cmdline I can use up/down to scroll through the command history. If the completion window is open, up/down scrolls through the items in the completion menu, even if I directly map up and down to fallback in the cmdline keymaps. Ideally I could navigate history directly without having to close the completion menu.

Even better: if I could have blink show my cmdline history in the completion menu, as a source that would be ideal.

chancez avatar Sep 30 '25 21:09 chancez

Can you share your configuration? Cmdline history would be neat but I'd rather it be written as a community source.

saghen avatar Oct 01 '25 01:10 saghen

Here's the relevant config

    cmdline = {
      enabled = true,
      completion = {
        list = {
          selection = {
            preselect = false,
            auto_insert = false,
          },
        },
        menu = {
          auto_show = true,
        },
      },
      keymap = {
        preset = 'inherit',
        ['<S-Tab>'] = { 'insert_prev' },
        ['<Tab>'] = { 'insert_next', 'fallback' },
        ['<C-p>'] = { 'insert_prev' },
        ['<C-n>'] = { 'insert_next' },
        ['<CR>'] = { 'accept_and_enter', 'fallback' },
        ['<Up>'] = { 'fallback' },
        ['<Down>'] = { 'fallback' },
      },
    },

chancez avatar Oct 06 '25 16:10 chancez

I'm trying to resolver a similar problem where typing <C-p> or <C-n> in cmdline without the completion popup menu opened does NOTHING where I would like to have cmline history navigation. This is even though I configured those keybinds with "fallback".

harogaston avatar Nov 08 '25 18:11 harogaston