Skip to content
Discussion options

You must be logged in to vote

Works for me:

          command_history = {
            confirm = "modify",
            actions = {
              execute_without_modification = function (_, item)
                local cmd;
                if vim.fn.mode() == "i" then
                  cmd = "<esc>:" .. item.cmd
                elseif vim.fn.mode() == "n" then
                  cmd = ":" .. item.cmd
                end
                vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(cmd .. "<cr>", true, false, true), "n", false)
              end,
              modify = function (_, item)
                local cmd;
                if vim.fn.mode() == "i" then
                  cmd = "<esc>:" .. item.cmd
                

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ccidral
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants