Trying to use atom as a revision sheet


Hi, first of all sorry for my english, it’s not my native language.
I’m in last year at high school and I really suck at chemical Physics and I wanted to make revision sheet to learn again from scratch and I was using atom while I had that idea and I tought that I could use Atom and create a language so when I’ll type the name of the gold atom (funny coincidence isnt it :smile: ) that is Au it will write it with a specific color automaticly like when I write print in python.
I’d like to do it to encourage me and to share it with some friends that need help too.
I hope I was clear, thanks by advance


Syntax highlighting in Atom is dictated by what the language package matches, and then colored by the syntax theme. You can circumvent those, though. If you add the following to your file (File -> Open Init Script), you will find all instances of Au colored in gold:

# Au man
ausomeFunction = (editor) ->
  options = {
    type: "text"
    style: {color: "gold"}

  editor.scan /\bAu\b/, (result) ->
    marker = editor.markBufferRange result.range
    decoration = editor.decorateMarker marker, options

atom.workspace.observeTextEditors (editor) ->

  editor.onDidStopChanging ->

Show all trailing whitespace, including when a line is just whitespace

Thanks a lot DamnedScholar ! Now I can see that I need to learn more about the script language that atom use so I’ll can scripts myself. I’ll try to learn on the documentation, I tought it would be easier than that. Thanks again.


Atom can natively interpret modern JavaScript (if you type atom -v into the command line, you’ll see the included version of Chrome) with features supported by Node and Babel, and version 1 of CoffeeScript. You are given an file, but you can rename it to init.js and write vanilla JS if you want.

The API documentation has a lot of good information, but not a whole lot of examples. If you need help figuring out how to accomplish a thing, there are a variety of people here like myself who have been doing it for a while.


Off topic

@LeeXiaoLong: I do like your creative idea!
Colours have always been the “memory language” I used in my school studies.
I would not have been able to remember mathematics theorems without it.

I have to say though that pencil / crayon (yes!) / pen to paper worked best for me in most cases. Something to do with handwritten (coloured!) notes committing better to memory.

…at least for me

Please a cautionary note - be careful that the journey you choose to develop some aid does not eat up all the time you need to commit the facts to memory. For me it it happened too many times.

Alternative - Have you considered putting your Python skills to work instead? Make a dictionary of the elements (whichever data you need to remember). Have a Python program give questions by random according to the entries of the dictionary.

It is in your hands.
Good will is attached from me to you with this message.
- Dan


@danPadric Thanks for your advice, I love your idea about making a Python program. I have concentration trouble that doesn’t help me to study and even when I try to study it’s hard to find informations I need that’s why I try to use programming to help me study. So I think I’ll take the Python option because I am much more comfortable with Python than Js. Sorry to post an off topic here in atom discussion and sorry for my english again. Thank you again @DamnedScholar and @danPadric


Your English is better than that of quite a few native speakers I’ve encountered.



A real community goes beyond its core topics.

Your topic is welcome.
You are welcome.

You and I may have a few things in common. I also struggle with studies and my native language is not English.


Your language skill looks good to me. From my experience: it helps to ‘think’ in the language you wish to communicate in. It programs your brain to handle that language more smoothly… as if native.

If you are from an Asian country - concentrate on speaking English a little bit slower than what you are used to in your own language. This helps Westerners to ‘hear’ you.


Consider… ‘art writing’ that you will see from cultures like Japan, China and Arabia is probably a mechanism to help people find a way to concentrate. Mine was chess. Perhaps coding is that for you.

Each of us need to find our own way on this. What I do know… the more senses (see, hear, touch, taste, smell) are included, the bigger chance for retention.

Just be sure that whatever you do does not eat up so much of your time that the actual task is not done. Sometimes there is no other way than doing a task the difficult straight-forward way.


Good luck.
- Dan