Repository navigation
Conversation
Pressing <cr> in the middle of a bullet splits the line without a bullet, so the text after the cursor loses its bullet. With the new g:bullets_add_bullet_on_split option, the text before the cursor is parsed for the bullet and the text after the cursor becomes the text of the next bullet, with numbering, checkbox and indent handled the same way as at the end of a line. When no bullet is added, the line is restored and split as before. The option defaults to 0 so the current behavior does not change. Closes bullets-vim#139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #139
Summary
Adds
g:bullets_add_bullet_on_split(default0). When it is1, pressing<cr>in the middle of a bullet moves the text after the cursor into a new bullet instead of a plain line.Whitespace around the split point is trimmed. An empty bullet (cursor right after the marker) is not deleted while splitting; the line is split as before.
The second commit removes a trailing space in
README.mdthat makesdprint checkfail onmaster(81570b9), so the Check Formatting job can pass.Evidence
plugin/bullets.vimonmaster, the new specsmoves the text after the cursor into a new bulletandmoves the text after the cursor into the next numeric bulletfailed, andsplits a line without a bullet as usualpassed.nvim --headless ... plenary.bustedcommand asmise run test), including the existingsplits the line and does not add a bulletspec with the default0.dprint checkpasses.Also checked by hand with the option on:
Merge Danger
Door: two-way
The behavior only changes when the option is set to
1.Blast Radius: small
s:insert_new_bullet()is shared by<cr>and normal-modeo; the new branch only runs in insert mode when the cursor is not at the end of the line.