How to color a plain text?


#1

Hi. I am beginner to Atom.IO. I want to use Atom also as an .txt reader for reading .txt files but could you tell me please how can I can color the plain text ? Thanks.


#2

Highlighting in Atom is determined by the active language grammar, which looks for specific words and gives them CSS classes so that the syntax theme can color them. It’s possible to create new grammars. Do you want specific words to be specific colors like Atom does with programming languages, or were you thinking about the ability to manually highlight arbitrary segments of text?


#3

No no. I just want to make the plain text in different color.


#4

Do you want it all to be the same color?


#5

Yes. This is what I want.


#6

Try adding this to your styles.less:

.syntax--text {
    color: green;
}

#7

(File -> Stylesheet… on Windows, Atom -> Stylesheet… on macOS, Edit -> Stylesheet… on Linux)


#8

Thank you!