如何在OS X的命令行中打开Atom编辑器?

编程入门 行业动态 更新时间:2024-10-25 10:20:58
本文介绍了如何在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 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

现在,您可以使用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. Hope this helps.

更多推荐

如何在OS X的命令行中打开Atom编辑器?

本文发布于:2023-10-23 00:16:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519169.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:编辑器   命令行   如何在   OS   Atom

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!