Built in Compiler?


Is there a built in C or java compiler in Atom like that in TextMate?

How can I compile c code out of atom?

I don’t think TextMate has built-in compilers.


Perhaps the OP is referring to something similar to the “Build” system in Sublime text?


If I go into TextMate -> Bundles -> C -> Run

It will compile the program and run it.

Similarly you could do the same for Java (Bundles -> Java -> Compile & Run)

Just wondering if there was a similar thing in Atom


The Node API has system level access, so if this doesn’t exist yet, it shouldn’t be hard to implement.

Looking at the API, you could probably do something like this to compile C:

var BufferedProcess = require('atom').BufferedProcess;
var process = new BufferedProcess({
  command: 'cc',
  args: 'path_to_your_file'

But I’m having trouble figuring out how to get the path of the file in the current buffer

editor = atom.workspace.getActiveEditor()
buffer = editor.getBuffer()
filePath = buffer.file.path


The Script Package will allow you to run C, Perl, Java and a horde of other compilers from a Command-i shortcut. like the Command-b build system of Sublime, similar to this Textmate builder.


Your post about Script Package was the most helpful. Thank you.