I have the Atom editor and was wondering how you can open a file or folder from the terminal in Atom. I am using a Mac. I am looking for a way to do this:
atom . (opens folder)
atom file.js (opens file)
atom (opens editor)
Is this possible and how do I set it up?
For Windows10 and new release of atom i solved the problem by adding in my ENV VARIABLE on the "PATH" row
add path(:/usr/local/bin/) in profile.
mac: $home/.bash_profile
export PATH=$GOPATH/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:$PATH
Open the application by name:
With the Atom editor open, in the menu bar:
Click Atom >> Install Shell Commands
You should expect to see:
Potentially restart your terminal. (I did just out of habit, not sure if you need to)
Roll your own with @Clockworks solution, or in Atom, choose the menu option Atom > Install Shell Commands. This creates two symlinks in
/usr/local/bin
The
atom
command lets you do exactly what you're asking.apm
is the command line package manager.I am on mingw bash, so I have created ~.profile file with following: alias atom='~/AppData/Local/atom/bin/atom'