Skip to content

feat: Support promotion instead of deletion the last empty bullet #163

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

Merged
merged 1 commit into from
May 24, 2025

Conversation

devsunb
Copy link
Contributor

@devsunb devsunb commented May 19, 2025

Support promotion instead of deletion the last empty bullet when hitting <cr> (insert mode) or o (normal mode).
Fixes #155

@dkarter
Copy link
Member

dkarter commented May 20, 2025

Thank you for this PR! I like the approach, but have two notes:

  1. Functional: to fully address the issue this is closing the behavior of = 2 should be that if it's the last bullet after we de-indented on the next return it should delete the bullet - this will be in line with the apps mentioned as an example (Obsidian/Google Docs etc).

  2. Super minor/docs: isn't it "demote" instead of "promote"? I could be wrong, but either way that terminology is a bit confusing. Maybe we should use "indent" and "deindent"? What do you think?

@devsunb
Copy link
Contributor Author

devsunb commented May 21, 2025

  1. It seems to work as you said. (same as :BulletPromote)
# cursor on |
- a
  - b
  - |

# after <cr>
- a
  - b
- |

# after <cr> again
- a
  - b
|
  1. I agree, but since this plugin consistently uses the terms Demote/Promote, I think it would be better to maintain consistency.

Support promotion instead of deletion
@dkarter dkarter merged commit 1c13e51 into bullets-vim:master May 24, 2025
1 check passed
@dkarter
Copy link
Member

dkarter commented May 24, 2025

Thank you! 🫶

@linkarzu
Copy link

Awesome, really appreciate this!

linkarzu added a commit to linkarzu/dotfiles-latest that referenced this pull request May 24, 2025
@devsunb devsunb changed the title feat: bullets_process_last_bullet_if_empty feat: Support promotion instead of deletion the last empty bullet May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQUEST] bullets_delete_last_bullet_if_empty only if no indentation
3 participants