Open PhiLhoSoft opened 8 years ago
This is a duplicate of #344 - feel free to subscribe there for updates.
I don't perceive this issue (which seems very narrow) to be a duplicate. My report isn't about syntax highlighting (or not only), but also about selection behavior and similar things. Now, if you fix all issues at once, that's fine then.
My apologies - I didn't read the issue closely enough :disappointed_relieved:.
@PhiLhoSoft Try removing $
from your editor's Non-word characters setting:
@Alhadis Ah, good idea, but then again, the big problem of this setting is that it is global to Atom, which makes it kind of useless. Lot of languages might not accept $ in the identifiers... And if I want to include - in CSS identifiers (where they are common), it might bring havoc in other source codes not putting spaces around this operator...
Then you scope the change to be language-specific. In your user config file:
".js.source":
editor:
nonWordCharacters: "/\\()\"':,.;<>~!@#%^&*|+=[]{}`?-…"
Wow, it works! Great solution, I forgot or didn't know about these language specific settings. http://flight-manual.atom.io/using-atom/sections/basic-customization/ For the record, at the end of config.cson, I added:
".js.source":
editor:
nonWordCharacters: "/\\()\"':,.;<>~!@#%^&*|+=[]{}`?-…"
".html.text":
editor:
nonWordCharacters: "/\\()\"':,.;<>~!@#%^&$*|+=[]{}`?…"
".stylus.source":
editor:
nonWordCharacters: "/\\()\"':,.;<>~!#%^&*|+=[]{}`?…"
And now I have a more consistent editing experience... :grin:
Don't you just love this program?!
I will leave this issue opened, as it is a (good) workaround, but it forces each user to do it (when they know the trick). Perhaps each language plugin should (be able to) set this setting by default.
And, but this is more an issue to open on core Atom, Find whole word doesn't take this setting in account. :disappointed:
Atom 1.7.3, Windows 7, although the latter is probably not relevant...
I searched for "dollar" and found no relevant issue, which is surprising... Actually, I am not sure if my issue should be here or in atom/atom (started to write there, made my mind to post here).
AFAIK, $ is part of the valid characters in identifiers, like underscore. Yet it is treated as a foreign punctuation character in many features of Atom. Examples:
$log
.And probably more...
Really annoying, particularly when you code in AngularJS... (many Angular identifiers start with $).
Side note: same problem in Java, except they add insult to injury by highlighting differently the part of the identifier after $... Will open a separate issue, of course.