Automatically de-duplicate pasted bulleted lists

Use case or problem

When I am editing a bulleted list, I often cut and paste an individual row to move it around (cutting a line like: - Last met on Tuesday).

When I create hit enter somewhere in the list to insert this new row Obsidian helpfully automatically inserts the next bulleted list entry for me (- ). If I then hit paste I end up with duplicated bulleted entries (- - Last met on Tuesday).

Proposed solution

When pasting in a bulleted list if:

  • the start of the paste exactly matches the current line, AND
  • the current line was created by an automatic insertion

Then de-duplicate the matching portion.

Ensure that this works for all kinds of list auto-inserts (- [ ], etc).

Current workaround (optional)

Manually delete the duplicated text after pasting.

So, after pasting the text - [ ] do chores, and ending up with the text - [ ] - [ ] do chores, I manually delete one of the - [ ] to end up with the text I pasted.

Related feature requests (optional)

3 Likes

I’m surprised this isn’t more popular! It drives me wild :slight_smile:

I have this issue too.

It might be a satisfactory workaround to use the hotkeys for move a line up or down.

You can set it up Ctrl + Up/Down for example, and it will allow you to very quickly rearrange your tasks without encountering the problem you describe.

Use Find and replace feature workaround

  • find β€œ- -β€œ
  • replace all with β€œ-β€œ

OR

  • find β€œ- - [ ]”
  • replace all with β€œ- [ ]”