如何从 OS X 的命令行打开 Atom 编辑器? [英] How can I open the Atom editor from the command line in OS X?
本文介绍了如何从 OS X 的命令行打开 Atom 编辑器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有 Atom 编辑器,想知道如何从 Atom 的终端打开文件或文件夹.我正在使用 Mac.我正在寻找一种方法来做到这一点:
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?
推荐答案
当 Atom 安装时,它会自动创建一个 /usr/local/bin 文件夹中的 >符号链接.但是,如果没有,您可以在 Mac 上自行创建:
When Atom installs, it automatically creates a symbolic link in your /usr/local/bin folder. 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
现在您可以使用 atom folder_name
打开文件夹,使用 atom file_name
打开文件.
Now you can use atom folder_name
to open a folder and atom file_name
to open a file.
这篇关于如何从 OS X 的命令行打开 Atom 编辑器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文