prueba con find

main
borja 1 year ago
parent abde05a54f
commit ac03e408f8

@ -57,8 +57,8 @@ local function add_todo()
local closedpattern = "^%s*%- %[[x]%]"
local line = vim.api.nvim_get_current_line()
local spaces = string.match(line, "^%s*")
print(spaces)
local i, spaces = string.find(line, "^%s*")
print(i, spaces)
-- if not string.match(line, openpattern) and not string.match(line, closedpattern) then
-- line = spaces .. "- [ ] " .. line

Loading…
Cancel
Save