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:
at
For Windows 7 x64 with default Atom installation add this to your PATH
%USERPROFILE%\AppData\Local\atom\app-1.4.0\resources\cli
and restart any running consoles
(if you don't find Atom there - right-click Atom icon and navigate to Target)
Open the application by name:
open -a 'Atom' FILENAME
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
When Atom installs it automatically creates a symlink in your /usr/local/bin. However in case it hasn't, you can create it yourself on your Mac
ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom
Now you can use atom folder_name
to open a folder and atom file_name
to open a file. Hope this helps.
Another simple solution is to add /usr/local/bin to your PATH. I had the same issue, I installed shell commands (see shaheenery's response) the symlinks already existed and pointing to the correct destination (see thomax's response), however I would still get 'not found'. I'm using Korn Shell btw.
Here's what I did:
$ emacs ~/.kshrc
)export PATH="/usr/local/bin:${PATH}"
source ~/.profile
$ atom -h
In addition to @sbedulin (Greeting, lovely Windows users!)
The general path on Windows should be
%USERPROFILE%\AppData\Local\atom\bin
If you are using a bash emulator like babun. You'd better checkout the shell files, which only available in the real app folders
/c/User/<username>/AppData/Local/atom/app-<version>/resources/cli/apm.sh # or atom.sh