Skip to content
Discussion options

You must be logged in to vote

There is no such action/mapping built-in, but it is possible to write custom picker that has one. Something like this:

require('mini.pick').setup()
require('mini.extra').setup()

MiniPick.registry.command_history = function()
  local edit_command = function()
    local cur_match = MiniPick.get_picker_matches().current
    cur_match = cur_match:gsub('^: ', ':')
    vim.schedule(function() vim.api.nvim_input(cur_match) end)
    return true
  end
  local opts = { mappings = { edit_command = { char = '<C-e>', func = edit_command } } }
  MiniExtra.pickers.history({ scope = ':' }, opts)
end

Now executing :Pick command_history will open picker with command history and custom <C-e> mapping (it is…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@echasnovski
Comment options

@eb0687
Comment options

Answer selected by echasnovski
Comment options

You must be logged in to vote
1 reply
@echasnovski
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.pick mini.extra
2 participants