todo-comments.nvim icon indicating copy to clipboard operation
todo-comments.nvim copied to clipboard

Error executing lua callback: Keyboard interrupt

Open lmapii opened this issue 2 years ago • 3 comments

I've installed todo-comments and I'm seeing this error message when I'm going back to normal mode from insert mode using <C-c>. I'm not really familiar with lua so I wouldn't know how to debug this problem, but I'd like to submit it nevertheless:

image

The exact actions that I'm performing are:

  • Navigate to a code block with {}
  • Execute ci{
  • Immediately try to go back to normal mode using <C-c>

Previously I had <C-c> mapped to <Esc> and I didn't seem to have this problem then.

lmapii avatar Oct 07 '22 15:10 lmapii

I just hit another bump, remapping <c-c> to <Esc> is actually a very bad idea since it doesn't allow you to quit the buffer that is displayed when using q: (see last commands). I'm very new to vim so it is still very hard to tell which mappings make sense and which ones don't.

lmapii avatar Oct 08 '22 06:10 lmapii

Hello, looks like the same Issue mentioned in Issue #73 and neovim Issue #16416 :thinking:? The mode for your remapping should be the insert mode, right? I have no problems with this and can leave the command history with it.

function Set_Keymap(mode, lhs, rhs)
	local opts = { noremap = true, silent = true }
        vim.keymap.set(mode, lhs, rhs, opts)
end

Set_Keymap("i", "<C-c>", "<Esc>")

zkygr avatar Oct 28 '22 16:10 zkygr

Looks suspiciously like the mentioned issue. Yeah I've just blindly remapped visual and normal mode too, if I only map it to the insert mode it actually looks good :)

lmapii avatar Oct 28 '22 18:10 lmapii

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jul 13 '24 01:07 github-actions[bot]