Why logical operators are not colored in one dark syntax theme



I’m using one dark theme and I really like it.

But I’ve noticed all the logical operators ( &&, ||, !, and, or ...) are not colored. I tried both Ruby and Javascript.

I’m not sure if it’s designed like that or there’s some settings for that?



I’m not sure if it’s designed like that

It seems like that: atom/one-dark-syntax#44

You can add this to your stylesheet:

atom-text-editor::shadow {
  // Color all operators
  .keyword.operator {
    color: red;
  // Color logical operators in Ruby, Javascript
  .ruby, .js {
    .keyword.operator.logical {
      color: red;

keyword.operator.logical in javascript since v0.99.0 (atom/language-javascript#225)



I have a similar question … I like the Monokai theme for revising/editing my MATLAB code, but I was wondering if there was a way to make the logical operator always pink and numbers always purple, because when they aren’t separated by a space, they take the same color as text (or variable) that precedes them.



Try with another theme. It should behave the same way, because what you’re seeing is a regular expression issue. There are several MATLAB language packages. Which one are you using? You might find that one of the others has better designed regular expressions.