fzf
fzf copied to clipboard
[FEATURE] Highlighted substring background color
- [x] I have read through the manual page (
man fzf
) - [x] I have the latest version of fzf
- [x] I have searched through the existing issues
Please add a background color to the 'highlighted substrings' options hl and hl+, eg hl_bg, hl_bg+
- OS
- [x] Linux
- [x] Mac OS X
- [ ] Windows
- [ ] Etc.
- Shell
- [x] bash
- [x] zsh
- [ ] fish
Tagging along because it seemed related and possibly better than opening a new issue.
Please consider adding theme variables for the query text (foreground and background). Something like query-fg
and query-bg
, perhaps, based on the naming conventions for the existing variables.
Use case: working on a quiet/minimal fzf theme and would like to disambiguate query text from candidate list:
@pete-debiase You might want to check out https://github.com/junegunn/fzf/issues/3029.
For now, you can try using reverse
attribute.
fzf --color hl:red:reverse,hl+:bright-red:reverse
When someone is modifying the code for this, can you guys please add an option to have "even line" and "uneven line" background colors? Thanks
@hugoeustaquio
add an option to have "even line" and "uneven line" background colors
Could you clarify what you mean by this? Different (alternating) background colors for even and odd lines in the candidate list? Similar to what GitHub does with Markdown tables, for example?
@junegunn Checked out #3029, I dig it :) .
I think I may be looking for "state disambiguation" (active text versus inactive text) rather than "spatial disambiguation" (text above the line versus text below the line) for my use case.
I would love to take a shot at implementing this if you'd be open to a PR. I have a few other things to get done first, but I will check back in to see if the coast is clear before looking into it any further :) .
@pete-debiase In the imagem below, you can see a printscreen of rofi, showing even lines having one background color, and uneven lines having another, creating a "zebra" effect on the list.
I use fzf like rofi, on a floating terminal, that option wold be eye candy.
@pete-debiase
Something like
query-fg
We already have it.
fzf --color query:bright-yellow
fzf --color query:bright-yellow:reverse
Surprised/embarrassed to find out I was on fzf 0.20.0 instead of the latest 0.34.0. Apparently they have me on an ancient version of Ubuntu on this confounded Windows/WSL work machine - I miss my comfy Manjaro home.
Apologies for being a bonehead. Thanks for pointing me in the right direction :) .
@pete-debiase
Something like
query-fg
We already have it.
fzf --color query:bright-yellow fzf --color query:bright-yellow:reverse
This works fine some cases, for a dark background and a light highlight, and vice versa. But it does not work in my case, black text and a solarized-light background (off-white), and then highlighter-pen type highlights, eg cyan, lime green, pink, yellow, violet, etc. as in this contrived example:
