Command+Backspace in a list should stop at the bullet

Use case or problem

If I am in a list and start writing, the Command-Del shortcut will delete all characters to the beginning of the line, including the bullet point and leading indentation. This is particularly cumbersome in nested lists where it take some work to get a new bullet point at the correct level of indentation before I can start writing again.

Proposed solution

If there is text between the bullet and the cursor, then it should only delete up to the space after the bullet.

<!-- before -->
- a list
    - nested
        - cursor is here |

<!-- after -->
- a list
    - nested
        - |

This is a behavior I’ve seen in some rich text editors. For example, this is Google Docs:

Screenshot 2024-01-12 at 10.15.55

If there is no text between the bullet and the cursor, then this can delete to the beginning of the line as before.

Current workaround (optional)

None

Related feature requests (optional)

I couldn’t find any

1 Like