Opening you graphical text editor from the terminal is pretty convenient. Although not the most technical solution, this is the easiest method.
Just open Atom, go to the Atom menu, and click Install Shell Commands
.
Be sure to have migrated Atom to /Applications
first, otherwise there might be some weird bugs if you decide to move it there later.