cambio leve

main
borja 1 year ago
parent 599d0524f7
commit c7a256fdab

@ -36,12 +36,10 @@ local function press_tab()
local closedpattern = "%- %[[x]%]" local closedpattern = "%- %[[x]%]"
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
vim.api.nvim_feedkeys(vim.api.nvim_eval('"\\<esc>"'), "n", 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("n", "<TAB>", press_tab, { desc = "On tab", noremap = true, expr = true })
-- function that checks if the current line starts with the string "- [ ]" or "- [x]" and toggles the x -- function that checks if the current line starts with the string "- [ ]" or "- [x]" and toggles the x

Loading…
Cancel
Save