nvim-markdown icon indicating copy to clipboard operation
nvim-markdown copied to clipboard

Added automatic list-enumeration upon addition or deletion of items + some refactors

Open nmder opened this issue 2 years ago • 1 comments

Hi there,

The key features added are:

  1. Deleting, pasting, or adding numbered items in normal mode---with d, p, and o/O, respectively---automatically adjusts the indices.
  2. Shift-Tab to de-indent bullets through <Plug>Markdown_DeindentListItem.

Also, vim.on_key callback is now restricted to post item-insertion only.

Thanks!

nmder avatar Jul 19 '23 10:07 nmder

Very cool :) First time I do a PR, I will put some comments for specific things as a review to see how it works. Bugs I found when testing:

  • If you make a new list item in the middle of a list and indent it, the parent list's markers are redone, but the child list's are not.
  • Inserting a new line above '1' in a child list inserts '2' instead of redoing it.

What errors do you get with the view stuff? It's necessary to save folds, so I prefer to solve it.

ixru avatar Jul 19 '23 15:07 ixru