diff --git a/plugin/todoer.lua b/plugin/todoer.lua index f832cec..b95a87a 100644 --- a/plugin/todoer.lua +++ b/plugin/todoer.lua @@ -37,10 +37,7 @@ local function press_tab() if string.match(current_line, openpattern) or string.match(current_line, closedpattern) then print("tab pressed, allegedly") - vim.api.nvim_feedkeys(vim.api.nvim_eval('"\\"'), "n", true) - vim.api.nvim_feedkeys(">", "n", true) - vim.api.nvim_feedkeys(">", "n", true) - vim.api.nvim_feedkeys("A", "n", true) + vim.api.nvim_feedkeys("C-t", "i", true) end end vim.keymap.set("i", "", press_tab, { desc = "On tab", noremap = true, expr = true }) @@ -55,10 +52,7 @@ local function press_shift_tab() if string.match(current_line, openpattern) or string.match(current_line, closedpattern) then print("shift tab pressed, allegedly") - vim.api.nvim_feedkeys(vim.api.nvim_eval('"\\"'), "n", true) - vim.api.nvim_feedkeys("<", "n", true) - vim.api.nvim_feedkeys("<", "n", true) - vim.api.nvim_feedkeys("A", "n", true) + vim.api.nvim_feedkeys("C-d", "i", true) end end vim.keymap.set("i", "S-Tab", press_shift_tab, { desc = "On shift tab", noremap = true, expr = true })