-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Ligature Request: =~ and !~ #293
Comments
These ligatures seem pretty invasive to me. They completely change the perception of the actual operator which has a specific meaning in these languages. I think readers would get confused when seeing them, but that's just my personal opinion. |
Another option, which would preserve the distinct parts of the original operators:
|
Where the tilde is used for the home directory it is almost always immediately followed by a slash. This could have been used to suppress the ligature and thus handle #167. Regular expressions are also often enclosed by slashes, but there usually is a space before the leading slash. @Drenmi's suggestion of an elongated or centered U+2245 ≅ for On second thought, |
I can’t rely on this sort of heuristic. It won’t work too often and users will end up with some magic replacement that sometimes works but sometimes does not. That increases confusion, and Fira Code goal always was to decrease confusion. |
Sometimes
Nor this lua 5.3 code (where foo=~bar |
Added to ss07 |
In Ruby and Perl there is
=~
to match a pattern (regex) and!~
to not match a pattern:It would be nice to have ligatures for both of these operators.
I propose the almost equals sign and the not almost equals sign:
(Adjusted for width, of course)
Regarding #167 (
export PATH=~/.local/bin:$PATH
) – I thinks it's safe to "activate" these ligatures only when there is whitespace around them (which is the idiomatic way to write the operators in both, Ruby and Perl):X =~ Y
would trigger,X=~Y
would not.The text was updated successfully, but these errors were encountered: