Is there any way to visually distinguish an en-das...
# random
s
Is there any way to visually distinguish an en-dash from an em-dash in IntelliJ? I can never tell whether I've typed the right one since they look the same 😞
Technically I think one might be a couple of pixels wider but that doesn't really help unless I'm looking at them both side-by-side
Wondering if there's a different font that will make them more obviously different, or something like that
a
Where are the dashes? In strings?
s
It's an XML file; they're in blocks of text in text nodes. Eventually it gets rendered much like an HTML document.
a
maybe you could add a custom inspection that finds em/en dashes and shows a low-level warning
s
Interesting idea! I could probably even get it to highlight them each in different colors using that approach 😄
🦜 1
f
Maybe there’s programming font, that will make sure to have clear differences between the 2. Suggestions: Check Jetbrains Mono and Fira-Code https://github.com/ProgrammingFonts/ProgrammingFonts
s
it's hard to usefully convey the difference between dash widths in a fixed-width typeface without making the common hyphen-minus incredibly small
a proportional type would make the difference apparent... but then you're reading XML in a proportional type
lol
k
I keep thinking one day (but that day never comes) I'll write some kind of plugin that shows in the status bar the hex code of the character under that cursor, and is continuously evaluated. Maybe someone has already written something like this?