How use Atom for C++ developement


Evening folks,

I’m taking a class in C++ at my university, and wanted to continue using Atom as my primary editor in Linux. However, I’m unsure on how to set up my environment to be able to program the language easily. More specifically, how do I best compile my code and test it? Currently, I’m using the script-plugin in order to compile my code, which works wonderful until I have to enter some input to test my code - which my exercises unfortunately require a lot.

My alternative is always having a terminal open in the background, manually compiling the code with g++ every time I want to test it, and then executing the file. Thus taking a lot of time and effort.

Any idea on how to do this more swiftly? I’d rather not switch editor, since Atom has worked very well for me until now. Thanks in advance.


The script package is not set up to take input. I don’t know that any of the on-the-spot runners are. However, you have a few options. You could have a terminal embedded in Atom (via platformio-ide-terminal or termination) and do the standard build process, but without changing the window. The package gpp-compiler has a Compile and Run command, so I presume that it runs the program automatically when compilation is finished.


Thanks, gpp-compiler did the trick! It compiled the program, and then ran it in a terminal. Seems to work nicely, letting me input too.