Selected match in HTML tag is indistinguishable from non-selected matches in dark terminals
Maintainers usually reply within 13 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- vim
- Domain
- tooling
Research direction
Reproduce with vim --clean index.html in a dark terminal, enable hlsearch, and search for /meta while cycling with CTRL-G/CTRL-T. Compare the selected and non-selected matches with and without termguicolors; done means the selected match is clearly distinguishable in dark terminals without requiring further configuration.
Written by the indexing model from the issue text.
Description
Steps to reproduce
For this reproduction, I'm using the MDN's basic HTML template.
- Ensure the terminal emulator is in dark style/mode
For GNOME Console and Ptyxis, this can be done from the main menu (F10). Ptyxis users should also set the GNOME colour palette in preferences (Ctrl+,), under the 'Appearance' tab.
For Konsole, ensure your profile's colour scheme is 'Breeze', which is the default for the 'Built-in' profile. - Edit the HTML file with Vim using
vim --clean index.html - Enable
hlsearchwith:set hlsearch - Perform a search for
/metawithout pressing<Enter> - Cycle between the results with
CTRL-G/CTRL-T
All matches are visually indistinguishable (black text with yellow highlight), making it impossible to tell which is selected without further configuration.
This is not an issue in light style/mode.
Expected behaviour
When the terminal emulators (Ptyxis, GNOME Console, and Konsole) are in light style/mode, Vim colours the meta text a darker shade of yellow. This distinction is important since the selected match is highlighted by reversing the text and background colour, while the non-selected matches simply use a light shade of yellow.
This means the match highlighting behaviour differs between light/dark terminal emulators:
- In light style/mode: the selected match is a dark shade of yellow, the non-selected matches are a light shade of yellow.
- In dark style/mode: all matches (selected, non-selected) share the same light shade of yellow. They're visually indistinguishable.
I'd expect the difference to be equally obvious when the terminal emulator is in dark style/mode.
I should note that setting termguicolors does make the selected match distinguishable in dark style/mode, as its background now adopts a slightly darker shade of yellow then the non-selected matches. Though it's certainly not a fix, since it remains difficult to discern the difference.
Version of Vim
9.2.1119
Environment
Operating system: Fedora Linux 43 (Workstation Edition)
Terminal: Ptyxis 49.3 (Fedora Workstation default, primary), GNOME Console 49.2, Konsole 26.08.0
Value of $TERM: xterm-256color
Shell: fish, version 4.2.0
Thank you for this wonderful software.
- Dominant language
- Vim Script
- Stars
- 41.4k
- Forks
- 6.2k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vim/vim
-
autoconf failes to find libsodium even when present due to implicit function declarationPossibly taken @coderjoe claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 13 days
-
`json_decode()` uses a number as a string pointer when 'encoding' has no converterPossibly taken @mattn claimed this 7 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 13 days
-
GTK4 build's v:servername is prefixed with $XDG_RUNTIME_DIR/vimMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 13 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 13 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 13 days
Similar issues
-
Needs Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
anthropics/skills#2328 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
tonydzi/sqlite-graph-memory#133 · 1 comment ·
Maintainers usually reply within 1 day
-
area: build-and-ci S3: minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
manaflow-ai/cmux#72257 ·
Maintainers usually reply within 1 day