main
borja 1 year ago
parent ad8ec54d10
commit 184b932b78

@ -37,10 +37,7 @@ local function press_tab()
if string.match(current_line, openpattern) or string.match(current_line, closedpattern) then if string.match(current_line, openpattern) or string.match(current_line, closedpattern) then
print("tab pressed, allegedly") print("tab pressed, allegedly")
vim.api.nvim_feedkeys(vim.api.nvim_eval('"\\<esc>"'), "n", true) vim.api.nvim_feedkeys("C-t", "i", true)
vim.api.nvim_feedkeys(">", "n", true)
vim.api.nvim_feedkeys(">", "n", true)
vim.api.nvim_feedkeys("A", "n", true)
end end
end end
vim.keymap.set("i", "<TAB>", press_tab, { desc = "On tab", noremap = true, expr = true }) vim.keymap.set("i", "<TAB>", 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 if string.match(current_line, openpattern) or string.match(current_line, closedpattern) then
print("shift tab pressed, allegedly") print("shift tab pressed, allegedly")
vim.api.nvim_feedkeys(vim.api.nvim_eval('"\\<esc>"'), "n", true) vim.api.nvim_feedkeys("C-d", "i", true)
vim.api.nvim_feedkeys("<", "n", true)
vim.api.nvim_feedkeys("<", "n", true)
vim.api.nvim_feedkeys("A", "n", true)
end end
end end
vim.keymap.set("i", "S-Tab", press_shift_tab, { desc = "On shift tab", noremap = true, expr = true }) vim.keymap.set("i", "S-Tab", press_shift_tab, { desc = "On shift tab", noremap = true, expr = true })

Loading…
Cancel
Save