helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
32.53k stars 2.4k forks source link

many built-in themes do not have a separate highlight color for the primary selection #3842

Open BrianHicks opened 1 year ago

BrianHicks commented 1 year ago

Summary

I've been trying to find a theme I like for use in Helix. Not hard—there are many good options—but I've had to decide against a lot of them because they do not have a separate color for the primary selection. (I use multiple selections a lot, so this is a problem for me!) Themes that seem to have this problem:

Reproduction Steps

Load up a big file (I used /usr/share/dict/words) and select some lines, then hit a-s to split into multiple lines. Cycle through the themes. I expected that all (or at least most) of the themes would show a difference between the primary and non-primary selections, but many of them do not.

https://asciinema.org/a/9gvV6uuz0QKLppxU9hA2aLLbo

Helix log

I've skipped providing this because it is not causing crashes or anything. Please LMK if it would still be helpful.

Platform

macOS

Terminal Emulator

wezterm 20220426-073620-4d09fe1f

Helix Version

helix 22.08.1 (66276ce6)

Omnikar commented 1 year ago

I had opened an issue about this a while ago: #1833

BrianHicks commented 1 year ago

oh! Sorry, I searched around but didn't find that one. Regardless, that's the complete list of themes with this problem at the current release.

AlexanderBrevig commented 1 year ago

I've added this as a requirement to #3234

archseer commented 1 year ago

For me this is not a problem but a feature. Since all selections are edited at once, there is no "primary" apart from view focus. The default theme deliberately doesn't style it differently.

AlexanderBrevig commented 1 year ago

For me this is not a problem but a feature. Since all selections are edited at once, there is no "primary" apart from view focus. The default theme deliberately doesn't style it differently.

It's not always apparent what , will do then, especially for beginners. Isn't the inclusion of ui.selection.primary in the code, an indication that it intended to be a visible difference?

n0s4 commented 1 year ago

For me this is not a problem but a feature. Since all selections are edited at once, there is no "primary" apart from view focus. The default theme deliberately doesn't style it differently.

Not a hugely important distinction, but with searching and n/N, the primary selection is the one that is moved to the search match.

I also like to know where my cursor will be when I , out.

gf3 commented 1 year ago

It's not always apparent what , will do then, especially for beginners.

not just beginners—it's literally impossible to see which match Alt-, will affect

e.g. suppose you have the following text selected:

"from", "suppliers",
"localField", "_id",
"foreignField", "_id",
"as", "supplier",

and you want to change the first , on each line to :

one method would be to select all commas (s,Return) and then cycle+deselect the line ending commas (Alt-,+()

but it's impossible to see where the primary cursor is which makes this extremely difficult

archseer commented 1 year ago

Prior discussion: https://www.reddit.com/r/kakoune/comments/txxv46/the_importance_of_distinguishing_primary_from/

I agree that maybe less distracting would be only coloring differently the primary cursor, not the whole selection.

taranlu-houzz commented 1 year ago

Just to add to this: in section 10.1 of the hx --tutor, the features of cycling and removing selections are demonstrated. Since the default theme does not have a way to distinguish the primary selection, it appears that ( and ) don't do anything (especially to someone new to helix). Basically, it gives the impression that something is broken.

JakeEP commented 1 year ago

I just came across this in the way that @taranlu-houzz suggests, from 10.1 of the tutor. I think it should be quite a clear difference in every theme, personally, as this is such a selection-centric editing experience (I haven't used vi before so this is all new to me). For those interested, these clearly distinguish both primary cursor and primary selection:

These clearly distinguish primary selection, not so much cursor:

I will be using dark_plus, for now.

manujarvinen commented 1 year ago

A new Helix 23.05 user here. Annoyed a bit by the fact that the even the note ( #5309 ) wasn't added to the tutorial.

Many hours were wasted because I thought the problem was in my system. Finally I ended up here.

I understand that changing the themes might take some time, but for the sake of newcomers who begin with the tutorial straight away, I'd say that's urgent. At least for the 'default' theme.

Image for the newcomers in here, that shows how nicely the theme _'ayuevolve', for example, indicates the primary selection:

image

noahfraiture commented 4 months ago

Either it's me or even the default theme doesn't show the difference, I don't understand how it isn't patch yet

enricoKoschel commented 4 months ago

A new Helix 23.05 user here. Annoyed a bit by the fact that the even the note ( #5309 ) wasn't added to the tutorial.

Many hours were wasted because I thought the problem was in my system. Finally I ended up here.

I understand that changing the themes might take some time, but for the sake of newcomers who begin with the tutorial straight away, I'd say that's urgent. At least for the 'default' theme.

Image for the newcomers in here, that shows how nicely the theme _'ayuevolve', for example, indicates the primary selection:

image

@manujarvinen Sorry if this is a bit off topic, but could you tell me which font you are using?

manujarvinen commented 4 months ago

@manujarvinen Sorry if this is a bit off topic, but could you tell me which font you are using?

By all means, I like the font very much. It suits Helix very nicely. It's from www.nerdfonts.com -> IosevkaTerm Nerd Font (can't remember the thickness, try to see what you like)

n8henrie commented 4 months ago

Are there any theme compatible with macOS Terminal.app (which doesn't have true color support) with which one can differentiate the primary selection? Trying to use alt, to drop some unwanted selections, but I'm flying blind here.

austinthresher commented 2 months ago

Another new user here who just wasted a lot of time because of this issue. It's ridiculous that this issue is almost two years old. This is exactly the kind of first impression that will drive people away from giving Helix a fair shot.

DaniD3v commented 1 month ago

I just figured out now that you're supposed to be able to differentiate these. I always thought I had to count the (/) presses to know where , will drop me off.

If you're not fixing this anytime soon, at least add a note in the tutor.

kirawi commented 2 weeks ago

I agree that this is a common issue for newcomers. If anyone is interested in resolving this issue for themes, I'd suggest submitting PRs so the theme maintainers can review them. In the meantime, I've added this to the wiki: https://github.com/helix-editor/helix/wiki/Troubleshooting#-and--does-not-cycle-the-selections

jonmon6691 commented 1 week ago

I agree that this is a common issue for newcomers. If anyone is interested in resolving this issue for themes, I'd suggest submitting PRs so the theme maintainers can review them. In the meantime, I've added this to the wiki: https://github.com/helix-editor/helix/wiki/Troubleshooting#-and--does-not-cycle-the-selections

I'd be interested in tinkering with this and submitting a pr, but I can't figure out where the default theme is stored. I don't see a default.toml in the runtime/themes/ folder. And find . -name "default.toml" didn't turn anything up in the source repo.

Does anyone know where the default there configurations are in the source?