diff options
Diffstat (limited to '.config/nvim/after/ftplugin/todotxt.lua')
| -rw-r--r-- | .config/nvim/after/ftplugin/todotxt.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/nvim/after/ftplugin/todotxt.lua b/.config/nvim/after/ftplugin/todotxt.lua index 526f29c..d5091b3 100644 --- a/.config/nvim/after/ftplugin/todotxt.lua +++ b/.config/nvim/after/ftplugin/todotxt.lua @@ -1 +1,14 @@ vim.opt_local.textwidth = 0 + +vim.keymap.set('n', '<m-x>', function() + require('mod.utils').edit_current_line(function(lines) + -- will only run for the current line + return vim.tbl_map(function(ln) + if string.sub(ln, 1, 2) == 'x ' then + return string.sub(ln, 3, -1) + else + return 'x ' .. ln + end + end, lines) + end) +end, { desc = 'Check todo', buffer = 0 }) |