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

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

Open
BrianHicks opened this issue Sep 14, 2022 · 21 comments
Labels
A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much

Comments

@BrianHicks
Copy link

BrianHicks commented Sep 14, 2022

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:

  • acme
  • autumn
  • autumn_night
  • ayu_dark
  • ayu_light
  • ayu_mirage
  • base16_default
  • base16_default_dark
  • base16_default_light
  • base16_terminal
  • base16_transparent
  • bogster
  • boo_berry
  • default (oh no!)
  • doom_acario_dark
  • everforest_dark
  • everforest_light
  • flatwhite
  • fleetish
  • gruvbox
  • gruvbox_light
  • noctis_bordo
  • nord_light
  • papercolor-light
  • penumbra+
  • rose_pine
  • rose_pine_dawn
  • rose_pine_moon
  • serika-dark
  • serika-light
  • sonokai
  • tokyonight
  • tokyonight_storm

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 (66276ce)

@BrianHicks BrianHicks added the C-bug Category: This is a bug label Sep 14, 2022
@kirawi kirawi added the A-theme Area: Theme and appearence related label Sep 14, 2022
@Omnikar
Copy link
Contributor

Omnikar commented Sep 14, 2022

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

@BrianHicks
Copy link
Author

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
Copy link
Contributor

I've added this as a requirement to #3234

This was referenced Sep 14, 2022
@archseer
Copy link
Member

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
Copy link
Contributor

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
Copy link
Contributor

n0s4 commented Sep 15, 2022

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
Copy link

gf3 commented Sep 15, 2022

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
Copy link
Member

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
Copy link

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
Copy link

JakeEP commented Dec 23, 2022

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:

  • dracula
  • dracula_at_night

These clearly distinguish primary selection, not so much cursor:

  • dark_plus
  • snazzy

I will be using dark_plus, for now.

@manujarvinen
Copy link

manujarvinen commented Aug 3, 2023

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 'ayu_evolve', for example, indicates the primary selection:

image

@noahfraiture
Copy link

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

nazarewk added a commit to nazarewk-iac/nix-configs that referenced this issue Apr 16, 2024
addresses helix-editor/helix#3842
might help with tinted-theming/base16-helix#12

Signed-off-by: Krzysztof Nazarewski <gpg@kdn.im>
@enricoKoschel
Copy link

enricoKoschel commented May 1, 2024

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 'ayu_evolve', 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
Copy link

@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
Copy link

n8henrie commented May 8, 2024

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.

LukeCarrier added a commit to LukeCarrier/dotfiles that referenced this issue Jun 11, 2024
@austinthresher
Copy link

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
Copy link

DaniD3v commented Aug 3, 2024

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
Copy link
Member

kirawi commented Aug 20, 2024

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

@kirawi kirawi added the E-easy Call for participation: Experience needed to fix: Easy / not much label Aug 20, 2024
@jonmon6691
Copy link

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?

@Mirko-von-Leipzig
Copy link

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?

Its in the root of the repo as theme.toml I think.

@jonmon6691
Copy link

@Mirko-von-Leipzig It is, thanks. I opened #11608 with my proposed changes but it appears I'm not the first and there are a few open PR's that could address this issue. Not sure what it would take to make a decision here but I did what I could :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much
Projects
None yet
Development

No branches or pull requests