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

[Feature request] Ignore newlines esp. between paragraphs #10

Open
xmacex opened this issue Jan 2, 2023 · 2 comments
Open

[Feature request] Ignore newlines esp. between paragraphs #10

xmacex opened this issue Jan 2, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@xmacex
Copy link

xmacex commented Jan 2, 2023

Hi, this is a fun plugin which can potentially help lift the burden of a writer. Thank you. I was wondering if it would make sense to ignore newlines, more specifically blank lines between paragraphs?

What is effectively happening as it currently stands is that the previous chapter is already two levels down, rather than one. Text with standard, empty-line-separated paragraphs therefore fades twice as fast as expected.

For example, when my cursor ‸ is after "Duis vitae turpis vel elit efficitur consequat in ac tellus":

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus aliquam turpis et velit venenatis, non interdum quam laoreet. Nam ultricies tellus pharetra nibh rhoncus dictum vitae ut erat. Donec id mauris mi. Nam malesuada auctor luctus. Suspendisse sed nisi at sapien varius sagittis. Suspendisse potenti. Proin erat sem, tincidunt eget ante nec, aliquam posuere neque. Morbi sed ante venenatis nisl tincidunt vulputate. In vitae orci congue, pellentesque purus sit amet, egestas diam.

Aliquam erat volutpat. Mauris gravida nulla ut semper ultrices. Maecenas laoreet lorem vel mauris consequat, vitae pharetra ligula malesuada. Integer vehicula sagittis nisi, ullamcorper imperdiet purus dignissim eu. Maecenas sagittis sapien ac ipsum euismod venenatis. Suspendisse et euismod enim. Praesent in pretium magna, at volutpat lacus. In felis lacus, fringilla eu nulla vel, venenatis commodo felis. Proin aliquam suscipit leo quis molestie.

Duis vitae turpis vel elit efficitur consequat in ac tellus. ‸

Run of text Distance from cursor Level Preferred level
Duis vitae... 0 0 0
\n\n 1 1 0
Aliquam.. 2 2 1
\n\n 3 3 1
Lorem... 4 4 2

If one uses multiple spaces between paragraphs, this also fades out paragraphs faster than might be intuitive and expected.

I hope I've explained it clearly, and that this might be something to consider as perhaps a change or option. I realize this is paragraph-based thinking, which might deviate from line-based thinking I read from the code e.g. in fadedLineDeco

const fadedLineDeco = (view: EditorView) => {

@xmacex xmacex changed the title [Feature request] Ignore newlines between paragraphs [Feature request] Ignore newlines esp. between paragraphs Jan 2, 2023
@skipadu
Copy link
Owner

skipadu commented Apr 2, 2023

Thanks for the feature request.
I think I understood what you mean and it does make sense to ignore blank lines.

@skipadu skipadu added the enhancement New feature or request label Apr 2, 2023
@redactedscribe
Copy link

redactedscribe commented Oct 14, 2023

I'd also like to see this. As simple as only counting lines with content would be a step forward.

| = cursor

AAA     Level 1
|       Level 0
BBB     Level 1
        Ignored
CCC     Level 2

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants