Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to configure increment on numbered list #152

Merged
merged 2 commits into from
Jul 5, 2021
Merged

Add setting to configure increment on numbered list #152

merged 2 commits into from
Jul 5, 2021

Conversation

yogeshlonkar
Copy link
Contributor

g:mkdx#settings.enter.increment allows to configure how new item index
is increment or decremented in case reorder/ delete

This is useful if you don't want to explicitly number items

`g:mkdx#settings.enter.increment` allows to configure how new item index
is increment or decremented in case reorder/ delete
@SidOfc
Copy link
Owner

SidOfc commented Jun 24, 2021

Hello @yogeshlonkar, cheers for the PR, although I do wonder a bit why this was needed (forgive my potentially naive mindset 😅).

If you don't want to explicitly number list items then you already have the ability to use an unordered list already with - or * tokens. Perhaps I am misunderstanding what this would otherwise achieve though, could you elaborate a little bit more on how it would improve specific use-cases?

@SidOfc SidOfc self-assigned this Jun 24, 2021
@SidOfc SidOfc added the feature:implementation Submitting new and additions to existing features. label Jun 24, 2021
@yogeshlonkar
Copy link
Contributor Author

yogeshlonkar commented Jun 30, 2021

With this you can create list like

image


  1. Something
    1. Random message
    2. Test lines
  2. Second component

This list creates above screenshot

Update:
Also if you modify markdown file from different editors you don't have to reorder indexes which I do sometimes. @SidOfc I hope that explains the use case if not I could explain further

Copy link
Owner

@SidOfc SidOfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello again Yoge, I understood that the code would end up creating the structure in your first example though I'm not sure how this would allow for the second example since all lists in mkdx are assumed to use one style per list only. e.g. I'm not sure what my code would even do in case of the second example using the mixed numeric / roman numeral style.

That said this seems like a pretty safe feature since it defaults to its original non-configurable value so no harm will really be done here. I added a review comment which will need to be fixed before I merge (it's about adding some missing docs).

Cheers for the PR and apologies for the delays in replies 👍

README.md Show resolved Hide resolved
@SidOfc SidOfc merged commit 7db6256 into SidOfc:master Jul 5, 2021
SidOfc added a commit that referenced this pull request Jul 5, 2021
@SidOfc
Copy link
Owner

SidOfc commented Jul 5, 2021

For reference, in above commit you can see what I changed in addition to your additions to the documentation. This PR has been merged 🎉

Cheers for your patience and the contribution 👍

@yogeshlonkar
Copy link
Contributor Author

@SidOfc thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:implementation Submitting new and additions to existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants