autolist.nvim
autolist.nvim copied to clipboard
[FR] Renumbering when list items are moved around
Is it possible to renumber list elements as you move them around?
If you have a key bind that moves lines around, you can add that to the auto list bindings for “renum”
If you have a key bind that moves lines around, you can add that to the auto list bindings for “renum”
I didn't get that 😊
Where is renum
in the lua files?
Do you have an example config snippet I can try?
lets say u use <c-j>
and <c-k>
to move lines around in normal mode:
require("autolist").setup({
normal_mappings = {
recal = {
"dd",
"<c-k>",
"<c-j>"
}
}
})
im pretty sure this works...
I don't have particular mappings to move lines around, so I just did:
require("autolist").setup({
normal_mappings = {
recal = {
"dd",
"p"
}
}
})
and it seems to work.
Shouldn't this be the default?
Ahh, yeah ok
sorry that was my alt
Maybe you should put this feature in the README under "An intro to autolist" and also the "recal" option in the example
IMHO it is not obvious that autolist.nvim has this feature.
Maybe also in the video :)
Thanks for the tip, imma close this now.