VonHeikemen / fine-cmdline.nvim

Enter ex-commands in a nice floating input.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maching in file <filename>?

tmpm697 opened this issue · comments

whenever i press : and use ctrl-n/p to surf through command-line history, it always echoes matching in file <filename> at bottom of nvim window, why?

I don't want any mesg when surfing the history.

i have map vim.api.nvim_set_keymap('n', ':', '<cmd>FineCmdline<CR>', {silent = true})

commented

The input is a floating window with a buffer, so my guess is ctrl-n/p do whatever default behavior they have in insert mode.

You might want to try this.

require('fine-cmdline').setup({
  after_mount = function(input)
    local fn = require('fine-cmdline').fn
    local opts = {buffer = input.bufnr, silent = true}

    vim.keymap.set('i', '<C-p>', fn.up_history, opts)
    vim.keymap.set('i', '<C-n>', fn.down_history, opts)
  end
})