This Atom package allows you to compile and run C and C within the editor. To compile C or C, press F5 or right click the file in tree view and click Compile and Run. To compile C or C and attach the GNU Debugger, press F6 or right click the file in tree view and click Compile and Debug. The GNU Compiler Collection may come with your distribution. Run which gcc g to find out. Here's a link for atom gnu gcc compiler- 1. Place the file in atom's package folder 3. Press F5 on atom editor to RUN n Compile your file. It will open text.ext as a output. Mastering the C programming language - a classic code environment used to build software, apps, and whole operating systems - is a great skill, and Mac OS X makes it easy to learn. Atom Editor by GitHub for the Developer. A hackable text editor for the 21st Century. You can customized all in Atom Editor. Features of Atom.
This site is intended to provide a resource for chemists using Apple Macintosh computers. The links in the sidebar give access to a variety of resources that I hope you will find valuable.
Have a look at the MacInChemBlog for the latest news, tips and comments.
You might also be interested in an article I wrote on my thoughts on scientific software and a listing of open-source cheminformatics toolkits and Open Source Python Data Science Libraries
If you have any comments or suggestions please contact me.
At a glance…
AppleScripts - A variety of Applescripts that might be useful for chemists together with a series of tutorials. For more information on Applescript have a look at the Applescript Resources Page.
iBabel - An easy to use, graphical user interface for the command line file conversion tool OpenBabel. It also includes 2D/3D structure viewers and an interface to ChemSpotlight.
Unix Tips Unix commands for helping deal with very large files
Mobile Science - Finding scientific iPhone (and iPad) applications on the App Store can be a bit hit and miss so I’ve compiled a database of all the apps that I am aware of, feel free to send me details of any that are missing.
Software Reviews - A Growing Collection of Reviews of Scientific Software
Tutorials, Hints and Tips - How to get the best out of scientific software, scripts, Jupyter notebooks and Meetings Reports
Data Analysis Tools - A comprehensive list containing all the Data Analysis Tools available for Mac OS X.
Reference Management - A comprehensive list containing all the Reference Management Applications available for Mac OS X.
Spectroscopy - A listing of Mac compatible apps
Cheminformatics toolkits - A listing of Open-Source Cheminformatics toolkits
Data Science Libraries - A list of useful python libraries for data science
Javascript Molecule Viewers - A list of Javascript/WebGL-based molecule viewers
Last Updated 13 January 2020
Compile-run C/C++ source code and execute Makefile in Atom.
Preface
GitHub - Sjlevine/atom-slime: Write Lisp Code Efficiently ...
I am a Windows user and just switched to Atom from Notepad++. Previously I wrote a script in NppExec to compile-run my C/C++ programs and execute Makefiles with customizable compile flags and run options. Atom has numerous community packages and I have tried some. They are really great in certain extent but still cannot fully satisfy my need. Therefore I decided to reference their packages and make my own.
Features
- Compile the current actively opened C/C++ file
- Execute the current actively opened Makefile
- Execute Makefile from Tree View
- Customize compilers used
- Customize compiler flags
- Customize run options
- Shortcut to compile-run [ default:
f6
] - Shortcut to access run options panel [ default:
ctrl-f6
/cmd-f6
]
Learn To Code Using The C Programming Language On Your Mac
Setup
I have tested in the following three platforms:
Windows
For Windows users, I recommend installing the TDM-GCC (which I am using), then go to the setting page of this package and change the make utility to mingw32-make
, after that everything should work. If you have installed other gcc-compilers, just make sure their command names are in you PATH
environment variable
Images For Atom C Mac
Ubuntu
For Ubuntu users, gcc
and make
should have already been installed, though you may need to install g++
in addition.
Mac
For Mac users, Xcode is not a prerequisite but you need to at least install the Xcode Command Line Tools. This site has a more detailed walkthrough.
Usage
Settings Page
- Edit compiler command name or path
- Edit compiler flags and run arguments
- Toggle unconditional build
Run Options
- Quick access to edit flags and arguments
- Can use
[shift-]tab
to change input focus andenter
to trigger therun
button - Can trigger one-time unconditional build here
Context Menu
Trigger Make-Run on Makefile from tree view
To execute a Makefile, a
run
target need to be specified, just as in the above.gif
Note: Arguments in run options will be passed as environment variableARGS
to the Makefile, but compiler flags and link libraries will not. Below is an examplerun
target:
Code and Repo Reference
I am new in CoffeeScript and know little about the Model-View-Controller design, thus my code may be messy. Below are the packages that I used and the repositories that I have referenced. They are great and you may want to try them out!
kriscross07/atom-gpp-compiler
+ A simple but useful package to compile-run C/C++ files
- Cannot customize run arguments
- On windows the cmd console just flash then close after the C/C++ program ends
! The closest that I want, thus mine is a remake with enhancementsrgbkrk/atom-script
+ Support many languages
+ Customizable compile and run flags
- Does not support C/C++ on Windows...
- Does not support interactive running
! The option view is modified from this packageksxatompackages/cmd-exec
+ Can register commands to do many things
- Troublesome to set upnoseglid/atom-build
+ Support automated build
- Need to specify an auto-build file