Anyone else here want to take a baseball bat to the xcode IDE on a regular basis and wish they could use Atom for code development in OF?

If so, here’s a handy guide. It’s super dead simple.

Go install atom if you haven’t now. This should also work for sublime, or even VIM.

Add OF to your system’s path. To do this you need to find a hidden file. Open up terminal and use this unix command to do it. Steps 3-5 will walk you through it.

Open terminal and simply cd and press enter

type open .bash_profile (or open this file in your editor of choice. If you have atom installed you can use atom .bash_profile)

add this line at the bottom of the file, then save and quit your text editor export OF_ROOT=~/Documents/of_v0.9.8_osx_release
(If you find this past this release, just update this to be whatever version of of you have downloaded, such as 9.9)

Now generate your OF project using the project generator. Go to atom or sublime and edit away. When you’re done, you’ll pop over to the terminal and change directory into your project’s root folder.

If you’re a total new soul cd is the Unix command to change directory. For example, cd ~/Documents would take you to your Documents folder. The ~ represents your user root directory. This should have your Desktop, Photos and Documents in it.

After you’ve changed directory into your project folder, all you have to do is type make on the command line. Yes, that’s it. They’ve now included make files with OF. Nice work folks. It will do all the heavy lifting for the compilation. The unix command make is a command that uses this utility called make to compile your applications. It’s really robust and cool and you can learn more about it here:http://www.tutorialspoint.com/unix_commands/make.htm

It ships with your mac. You shouldn’t need to install it.

Read how to launch your app from here - it’s dead simple and make will explain it when it’s done building for you. Just read what it prints out about it in terminal.

you can also use atom’s build-make plugin to directly build and run from inside atom without having to go back and forth from a console and the atom linter plugin is also a nice one to have installed so it marks errors inlined in the code while compiling.

there’s the auto complete clang plugin: https://atom.io/packages/autocomplete-clang, it requires some file per project which telss the plugin where to look for headers… it’s easy to make the makefiles emit such a file but last time i tried it it was too slow for OF, OF includes so many headers that also makes available to users right away that it makes most auto complete systems really slow.

it seems that the plugin now supports precompiled headers which might make things faster but not sure how easy it would be to generate them, in any case it surely needs some modification on the makefiles

make Debug will generate a binary with debugger hints included so you can load it up in gdb or similar (using gdb with OF is probably a topic all on its own).

make run will run the binary after it’s been compiled [I would expect it to automatically compile if necessary, but at least on linux it doesn’t see to do that. I’m going to report it as a bug. In the meantime, `make && make run` should work as a general “compile and run” command]

make clean should clean everything up, deleting the binary and any intermediate files (.so's and such)

Ah! I’m so close but I can’t make it work yet! I have the build-make plugin and Atom is compiling a project, but not running it. The make plugin only sees the default target. How do I get it to actually run the project?

Oh! Yay for using Editors to code! did anyone get Auto Complete to work under Sublime Text 3? It’s my editor of choice since almost 6 years and I’d just love to not have to switch to Atom… although I know it’s great any help greatly appreciated!