Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.54k stars 173 forks source link

[wish] new Fold style: the horizontal line below fold block - to start at indentation and end at visible chars or at end of line #5267

Closed victorel-petrovich closed 1 year ago

victorel-petrovich commented 1 year ago

This would be an alternative to current style 4 (horizontal line below the text line).

Why better: often the fold blocks are deeply indented and/or short, so having the under-lines as long as the window does not make sense, it's noise in the view.

victorel-petrovich commented 1 year ago

However, if https://github.com/Alexey-T/CudaText/issues/5268 were fixed, then personally I'd have less need for this new style.

Alexey-T commented 1 year ago

made the change. now dashed underline is limited on the right edge. by text len.

li

Alexey-T commented 1 year ago

@victorel-petrovich I see you have Notepad++ repo, so

victorel-petrovich commented 1 year ago

made the change. now dashed underline is limited on the right edge. by text len.

This is an improvement on current style 4, thank you.


However, it can still be better, IMO, if the under-line starts after indentation, if not hard to implement.

starts left margin starts after indentation

Not only for programming:

text_starts left win text_starts at indent

victorel-petrovich commented 1 year ago

@victorel-petrovich I see you have Notepad++ repo, so

That has been just a short temporary experiment...

  • let's suggest some small good features from NP++ which is not hard it add to Cud

I'll happily do that when they occur to me.

Alexey-T commented 1 year ago

i have a progress, line now considers indentation. will post the .exe soon.

lines

one thing: code will fail if indent is mixed spaces+tabs.

Alexey-T commented 1 year ago

beta cudatext.exe is posted in the nearest issue.

victorel-petrovich commented 1 year ago

Good! I will check it out.

  • maybe you can write the comparision Cud VS NP++, which i can post to the wiki

I'm not the right person for it (I only know N++ at basic level, and just starting with Cudatext), but I've found this: https://community.notepad-plus-plus.org/topic/18473/the-best-way-to-boycott-np-is-to-use-another-better-text-editor-cudatext

EDIT: scroll a bit down for the reply of dinkumoil

I wonder a bit what your secret is, how you manage to make progress on Cuda so fast... maybe because it's easier to program in Pascal than say C++ ?

Alexey-T commented 1 year ago

maybe because it's easier to program in Pascal than say C++ ?

yes, easier in Pascal. and Pascal compiles much faster. main goal of Pas - simpler work.

Alexey-T commented 1 year ago

https://community.notepad-plus-plus.org/topic/18473/the-best-way-to-boycott-np-is-to-use-another-better-text-editor-cudatext

we talked with that person, years ago. I know this link. not very detailed info for the wiki...

victorel-petrovich commented 1 year ago

did you scroll a little down to see this reply of dinkumoil?

Alexey-T commented 1 year ago

oh, thanks for this link. overlooked. i will read it soon and maybe it's OK for the wiki.

Alexey-T commented 1 year ago
victorel-petrovich commented 1 year ago

Hello Alexey, I'm finally back, I didn't feel well the past few days. But you're very fast again !

beta cudatext.exe is posted in the nearest issue.

I see that you meant the link in the reply in the other issue. How about a permanent "beta" release here on github somewhere (maybe at https://github.com/Alexey-T/CudaText/releases) ?.. Time-stamped and with a link to the history file.

That you could update every couple of days and/or when people want to test the new features.

Unless it's rare that people volunteer to test.

victorel-petrovich commented 1 year ago

I tested the short under-lines with your provided .exe , all appears good .

from next update, you will need to activate the new rendering of underline, via "fold_underline_full". in user.json. default is 'true', to render faster (avoids calculation of line indents).

Understandable. What do you think if instead have just one extra fold style, 5th, with short under-lines, besides 4th style r? It will be easier for the user to find and set, in a single place with other styles.

ADD: Also, if your first variant (underline limited on the right edge, by text len) was not computationally so intensive, maybe that can replace the current style 4.

Alexey-T commented 1 year ago

How about a permanent "beta" release here on github somewhere (maybe at https://github.com/Alexey-T/CudaText/releases) ?..

no, it is not good idea for me. i prepare the beta for specific OS only.

Alexey-T commented 1 year ago

option "fold_underline_full" was renamed to "fold_underline_size".

What do you think if instead have just one extra fold style, 5th, with short under-lines, besides 4th style r?

not good for me, because the length of a line is a separate option in the pascal.

also in pascal (but not public in UI): option for STYLE of underline: dotted, solid, dashed.

Alexey-T commented 1 year ago

as you see I cannot put new option as "fold_style":5. not boolean!

Screenshot from 2023-11-15 09-23-41

victorel-petrovich commented 1 year ago

Now you've offered sizes for all possible tastes :)

Having them in the separate "fold_underline_size" is good too!

I'll close the issue, it's more than "solved".