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

feat: add blank lines between tangled blocks #958

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

rileyshahar
Copy link
Contributor

@rileyshahar rileyshahar commented Jun 21, 2023

Resolves #955.

@rileyshahar
Copy link
Contributor Author

Sorry for the force push; I copied the wrong issue number.

jonathf added a commit to jonathf/neorg that referenced this pull request Jul 6, 2023
An extention to the idea discussed in nvim-neorg#958.

Add heading text as delimiter if:

1. There is in-fact a current heading. Headings are optional.
2. Current heading hasn't been used as a delimiter before.
3. `commentstring` is available for the filetype in question.

That last one requires making a temporary scratch buffer to trigger
ftplugin, which retrieves `commentstring` for all supported filetypes in
vim.
jonathf added a commit to jonathf/neorg that referenced this pull request Jul 6, 2023
An extention to the idea discussed in nvim-neorg#958.

Add heading text as delimiter as a comment if:

1. There is in-fact a current heading. Headings are optional.
2. Current heading hasn't been used as a delimiter before.
3. `commentstring` is available for the filetype in question.

Otherwise just use a newline.

That last one (3) requires making a temporary scratch buffer to trigger
ftplugin, which retrieves `commentstring` for all supported filetypes in
vim.
@rileyshahar
Copy link
Contributor Author

Happy to close in favor of #981, if that gets merged. Will leave it open in case we prefer the lower-complexity solution.

jonathf added a commit to jonathf/neorg that referenced this pull request Jul 7, 2023
An extention to the idea discussed in nvim-neorg#958.

Add heading text as delimiter as a comment if:

1. There is in-fact a current heading. Headings are optional.
2. Current heading hasn't been used as a delimiter before.
3. `commentstring` is available for the filetype in question.

Otherwise just use a newline.

That last one (3) requires making a temporary scratch buffer to trigger
ftplugin, which retrieves `commentstring` for all supported filetypes in
vim.
@vhyrro
Copy link
Member

vhyrro commented Aug 1, 2023

As we discussed in the other thread, at some point we would also like this to be configurable. In the meantime though this is perfectly fine, thank you! 💜

@vhyrro vhyrro merged commit 1c41592 into nvim-neorg:main Aug 1, 2023
2 checks passed
jonathf added a commit to jonathf/neorg that referenced this pull request Aug 2, 2023
An extention to the idea discussed in nvim-neorg#958.

Add heading text as delimiter as a comment if:

1. There is in-fact a current heading. Headings are optional.
2. Current heading hasn't been used as a delimiter before.
3. `commentstring` is available for the filetype in question.

Otherwise just use a newline.

That last one (3) requires making a temporary scratch buffer to trigger
ftplugin, which retrieves `commentstring` for all supported filetypes in
vim.
benlubas pushed a commit to benlubas/neorg that referenced this pull request Jan 11, 2024
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.

insert blank lines when tangling
2 participants