You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Frankly, I dont use Atom to edit Java code, I use Eclipse instead. Given the low number of issues here, either I am not alone, or you are very good... 😛
OK, let's repeat the gist of the previous issue:
Atom 1.7.3, Windows 7, although the latter is probably not relevant...
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:
Double click to select the identifier: the $ isn't selected (if prefix or suffix) or stops the selection (in the middle).
Word move with Ctrl+Left / Right arrow: stops on $
Search log with Whole Word option: selects the log part of $log.
If an identifier has a $ in its middle, the part after the $ is highlighted differently.
I know that Sun recommended not to use $ in identifiers, keeping this usage for themselves, but yet it is a valid char, and should be treated as such.
Correct me if I'm wrong, but I don't think the "double-click" or ctrl-left to jump words is managed by the languages. @50Wliu ?
If not than this can be closed.
Correct me if I'm wrong, but I don't think the "double-click" or ctrl-left to jump words is managed by the languages
If not, it is a problem (with Atom itself) / they should be: these operations are based on the concept of "words", and this concept is tightly related to the language: $ is a good example here (valid in JS / Java, not in some other languages), but in other languages (CSS for example) dash is also part of identifiers (words), and so on. Idem for Unicode characters.
@PhiLhoSoft I totally agree. It should be part of the language definition. But as it is now, the rest of this issue (aside from highlighting) does not belong to this repo (if that is so).
In CSS, stuff like dashes in e.g. border-top behave the same way as how you're describing $ in java.
Correct me if I'm wrong, but I don't think the "double-click" or ctrl-left to jump words is managed by the languages. @50Wliu ?
It actually is. editor.nonWordCharacters can be modified by languages (and I have a local branch changing that). I think the Find and Replace "whole word" regex can't be changed though.
I haven't understood the comment of @50Wliu until today, thanks to the comment atom/language-javascript#374 (comment)
So, we can at least fix that ourselves. Might be nice to be the default, though.
Activity
noseglid commentedon Jun 28, 2016
Variables with
$is correctly highlighted now.Correct me if I'm wrong, but I don't think the "double-click" or
ctrl-leftto jump words is managed by the languages. @50Wliu ?If not than this can be closed.
PhiLhoSoft commentedon Jun 28, 2016
If not, it is a problem (with Atom itself) / they should be: these operations are based on the concept of "words", and this concept is tightly related to the language: $ is a good example here (valid in JS / Java, not in some other languages), but in other languages (CSS for example) dash is also part of identifiers (words), and so on. Idem for Unicode characters.
noseglid commentedon Jun 28, 2016
@PhiLhoSoft I totally agree. It should be part of the language definition. But as it is now, the rest of this issue (aside from highlighting) does not belong to this repo (if that is so).
In CSS, stuff like dashes in e.g.
border-topbehave the same way as how you're describing$in java.PhiLhoSoft commentedon Jun 29, 2016
That's annoying, but indeed, if that's beyond your scope, please feel free to close the issue if you fixed what was within your reach.
winstliu commentedon Jul 15, 2016
It actually is.
editor.nonWordCharacterscan be modified by languages (and I have a local branch changing that). I think the Find and Replace "whole word" regex can't be changed though.noseglid commentedon Jul 15, 2016
Cool, thanks for the correction!
PhiLhoSoft commentedon Aug 26, 2016
I haven't understood the comment of @50Wliu until today, thanks to the comment atom/language-javascript#374 (comment)
So, we can at least fix that ourselves. Might be nice to be the default, though.