Github发布了与Sublime非常相似的Atom。甚至一些键盘快捷键,如⌘+ P,⌘+ Shift + P等也是一样的。

Atom和Sublime有什么不同? 它是否包含诸如构建工具、函数定义跳转、文档等IDE特性? 有没有使用Sublime的人收到测试邀请,指出它们之间的区别? 我可以使用Sublime的主题、方案和包吗?就像Sublime可以使用文本伴侣一样。

1

PS:在新标签中打开图像以获得更大的分辨率。


另一个区别是Sublime文本是一个闭源项目,而Atom源代码是/将是公开可用的——尽管Github不打算将其作为一个真正的开源项目发布。他们想要提供对代码的访问权限,而不是向贡献者开放代码。

Github公开了代码:http://blog.atom.io/2014/05/06/atom-is-now-open-source.html

Atom是使用Node.js, CoffeeScript和LESS编写的。然后它被包装在WebKit包装器中,该包装器最初只适用于OSX,尽管现在也有Windows版本可用。(Linux版本必须从源代码构建,但Ubuntu用户有一个PPA。)

很多架构和功能都复制自Sublime Text,因为它们都经过了尝试和测试。插件系统的工作原理几乎是一样的,但是通过公开新的api也打开了许多新特性和潜力。

我相信,由于肌肉记忆,快捷键基本上保持不变——人们会记住它们,并能够立即点击Atom。

首选项可以通过GUI来控制,而不是直接编辑JSON,这可能会降低人们开始使用Atom的入门门槛。我自己发现很难导航所有这些,因为在首选项中没有搜索功能。

你可以在##atom- invitation IRC频道上注册一个邀请,或者注册到他们的网站并添加你的电子邮件。第一轮邀请很快就来了。

我今天刚收到测试邀请,马上试用了亚当。GUI感觉像Sublime,是的,有一些捷径采用了Sublime。

除了上面提到的这些,我还发现了一些不同之处:

Vim mode is not as good as the Vintage mode on Sublime (which is not a fully featured vim either) because the vim package is in an early stage of development. See https://atom.io/packages/vim-mode for detail. As James mention, Atom is written using web tools, so you have access to the stylesheet of the text editor (styles.less) to do whatever appearance changes you want using CSS. There is also an option to change the startup CoffeeScript. Again, because Atom is still in the beta stage, Sublime has much more native plugin packages. However, since Atom is written in Node.js, the Atom official site said you can "choose from over 50 thousand in Node's package repository." (Because I am not a Node.js pro, I haven't look into this feature though) Atom has better Github support out of the box, but Sublime has a several Git packages. Sublime is a paid application unlimited evaluation period. Atom is free at the beta stage but we don't know whether Github wants to charge it or not.

因此,Atom是一个在测试阶段使用web技术构建的文本编辑器。相比之下,Sublime经历了许多不同的迭代。Atom仍然缺少很多Sublime支持的包,所以问题是Atom会赶上Sublime还是会变得更好?Github似乎对这个文本编辑器的未来很有信心,因为它的底层技术很受欢迎,从长远来看,Atom可能会是Sublime的一个很好的替代品。

除了前面的回答之外,还有必要从开发过程中所做的选择的角度来澄清这两种产品之间的差异。

Sublime is binary compiled for the platform. Its core is written in C/C++ and a number of its features are implemented in Python, which is also the language used for extending it. Atom is written in Node.js/Coffeescript and runs under webkit, with Coffeescript being the extension language. Though similar in UI and UX, Sublime performs significantly better than Atom especially in "heavy lifting" like working with large files, complex SnR or plugins that do heavy processing on files/buffers. Though I expect improvements in Atom as it matures, design & platform choices limit performance.

The "closed" part of Sublime includes the API and UI. Apart from skins/themes and colourisers, the API currently makes it difficult to modify other aspects of the UI. For example, Sublime plugins can't interact with the sidebar, control or draw on the editing area (except in some limited ways eg. in the gutter) or manipulate the statusbar beyond basic text. Atom's "closed" part is unknown at the moment, but I get the sense it's smaller. Atom has a richer API (though poorly documented at present) with the design goal of allowing greater control of its UI. Being closely coupled with webkit offers numerous capabilities for UI feature enhancements not presently possible with Sublime. However, Sublime's extensions perform closer to native, so those that perform compute-intensive, highly repetitive or complex text manipulations in large buffers are feasible in Sublime.

Since more of Atom will be open, Github open-sourced Atom on May 6th. As a result it's likely that support and pace of development will be rapid. By contrast, Sublime's development has slowed significantly of late - but it's not dead. In particular there are a number of bugs, many quite trivial, that haven't been fixed by the developer. None are showstopping imo, but if you want something in rapid development with regular bugfixing and enhancements, Sublime will frustrate. That said, installable Atom packages for Windows and Linux are yet to be released and activity on the codebase seems to have cooled in the weeks before and since the announcement, according to Github's stats.

In terms of IDE functions, from a webdev perspective Atom will allow extensions to the point of approaching products like Webstorm, though none have appeared yet. It remains to be seen how Atom will perform with such "heavy" extensions, since the editor natively feels sluggish. Due to restrictions in the API and lack of underlying webkit, Sublime won't allow this level of UI customisation although the developer may extend the API to support such features in future. Again, Sublime's underlying performance allows for things that involve computational grunt; ST3's symbol indexing being an example that performs well even with big projects. And though Atom's UI is certainly modelled upon Sublime, some refinements are noticeably missing, such as Sublime's learning panels and tab-complete popups which weight the defaults in accordance with those you most use.

我认为这些产品是互补的。事实上,他们分享相似的视觉效果和按键只是增加了这一事实。在某些情况下,使用任何一种都有优势。目前,Sublime是一个成熟的产品,在所有三个平台上都具有相同的功能,并拥有丰富的插件集。Atom是新出生的孩子,他的五官会迅速长出来;它感觉还没有准备好生产,在性能方面有一些担忧。

[更新/编辑:2015年5月18日]

关于这两个编辑器自撰写上述文章以来的改进说明。

In addition to bugfixes and improvements to its core, Atom has experienced a rapid growth in third-party extensions, with autocomplete-plus becoming part of the standard Atom distribution. Extension quality varies widely and a particular irritation is the frequency by which unstable third party packages can crash the editor. Within the last year, Atom has moved to using React by way of shifting reflow/repaint activity to the GPU for performance reasons, significantly improving the responsiveness of the UI for typical editing actions (scrolling, cursor movement etc.). While this has markedly improved the feel of the editor, it still feels cumbersome for CPU intensive tasks as described above, and is still slow in startup. Apart from performance improvements, Atom feels significantly more stable across the board.

Development of Sublime has picked up again since Jan 2015, with bugfixes, some minor new features (tooltip API, build system improvements) and a major development in the form of a new yaml-based .sublime-syntax definition (to eventually replace the old xml .tmLanguage). Together with a custom regex engine which replaces Onigurama, the new system offers more potential for precise regex matching, is significantly faster (up to 4x) and can perform multiple matches in parallel. Apart from colouring syntax, Sublime uses these components for symbol indexing (goto definition etc.) and other language-aware features. In addition to further speeding up Sublime, particularly for large files, this feature should open up the potential for performant language-specific features such as code-refactoring etc.. Further 'big developments' are promised, though the author remains, as ever, tight lipped about them.

我尝试了Atom,它看起来真的很好,但有一个主要问题(至少在0.84版):

它不支持垂直选择Alt+拖动-这是每个现代代码编辑器必须的。

Atom是开源的(到现在已经有几个小时了),而Sublime Text不是。

How is Atom different from Sublime? Atom is an open source text editor/IDE, built on JavaScript/HTML/CSS. Sublime Text is a commercial product, built on C/C++ and Python. Comparable to Atom is Adobe Brackets, another open source text editor/IDE built on JavaScript/HTML/CSS. Be minded that this makes Brackets more oriented towards Web development, specially in the front end. Advantages of open source projects are faster rate of development and, of course, price. Does it include IDE features like build tools, function definition jumps, documentations, etc.? The short answer is yes, yes, and yes. The app is completely modular. Open source will give people the freedom to fill the gaps on several of these features. Has anyone using Sublime got a Beta invitation to point out the differences? Advantages of Atom is entry-level hackability, since it's built on the same code that powers Web sites. Advantages of Sublime Text is performance, as it doesn't need to run on top of Node.js, and it's a more mature product, about to reach a stable version 3. There are a long list of minor differences that can be included in the comments (I wish this markdown could be able to draw a table for comparisons, but that's another issue). Because of Atom's rapid turnout, I am afraid some of differences I list here will become outdated over time. Per example, at the time of this writing, Atom is only available on the Macintosh while Sublime Text is already multiplatform. Can I use the themes, schemes and packages from Sublime as is, like Sublime could do with text mate. The short answer is no, but because of Atom's hackability, it will be easy to retool packages from other editors to Atom.

一个主要的区别是支持“印度字体”,也就是南亚脚本(包括高棉语、老挝语、缅甸语和泰国语等东南亚语言)。此外,对东亚语言(中文、日语、韩语)的支持也更好。这些是已知的错误(实际上是评分最高的错误),已经存在多年了(东亚语言支持似乎以前工作得更好,但现在已经很难使用):

http://sublimetext.userecho.com/topic/117587-thai-language-issue/ http://sublimetext.userecho.com/topic/99013-can-not-show-or-type-chinese-charactor-on-ubuntu-system/

以下是两者之间的一些区别:

Atom是开源的(MIT许可证) Sublime Text的单用户许可证价格为70美元。


Atom是用Node.js, CoffeeScript, HTML和LESS编写的。 Sublime Text是用c++编写的,Python用于插件,Objective-C用于Cocoa集成


Atom有一个内置的包管理器* Sublime Text依赖于第三方的包管理解决方案 (Wbond包装控制)


在撰写本文时(05/20/2014),Atom二进制文件仅适用于Mac OS X(10.8或更高版本)。如果你想在Windows或Linux下使用它,你必须自己构建它。更新:现在,有适用于Mac OS X(10.8或更高版本)Windows和Linux的Atom二进制文件。 Sublime Text二进制文件可用于Mac OS X, Windows(可安装或可移植)和Linux(作为.deb或tarball文件)


Atom设置可以通过用户友好界面进行配置,也可以直接通过编辑配置文件进行配置。 Sublime Text仅允许您通过配置文件更改设置。


虽然APM是一个独立的工具,但它是与Atom一起捆绑和自动安装的

我在一个极端的环境下工作;编辑远程文件系统上的文件(外部网络,当然),是安装在我的笔记本电脑通过ssh(aka。sshfs)。不管我为什么要这样做,尽管它的响应很麻烦,但当我使用Sublime Text 2时,它是相当可以接受的。

读了这篇文章后,我尝试了Atom,但结果对我来说有点痛苦;Atom似乎不能有效地缓存目录结构。每当我在树视图中展开一个文件夹时,UI会冻结一小段时间,2~3秒,可能是获取文件系统信息。是的,这是因为我正在使用远程文件系统。但是Sublime的处理效率更高,至少它不会在我每次展开文件夹时冻结,所以不那么痛苦。

我认为免费的Atom非常棒,我的故事很琐碎,有一天可能会被增强,但在这个时候它会对某些人有所帮助。

--

2014年8月26日添加

Recently, I changed my laptop from Macbook Air 2010 late to Macbook Pro 13" 2013 late. It has likely 4 times faster CPU and much enhancements in performance. I want to mention my opinion is about in the case WHEN YOU MOUNT REMOTE FILE SYSTEM. (using OS X Mavericks, most recent version of Atom, FUSE 2.7.3 / OSXFUSE 2.6.4 / sshfs 2.5.0, and remote system is Ubuntu server) Eventually, UI freeze gets pretty shorter, but it is still there. Specifically, to open a folder with many folder/files in it and index it is requires certain amount of time. Also, if you expand a folder full of files, it just falters. (when collapsing the folder, it doesn't)

根据@EliDuenisch的说法,这似乎不会发生在Linux Mint上。我不确定,但可能是因为操作系统之间的差异。当然,如果您在本地文件系统上工作,则完全不必关心这个问题。

Atom由Github创建,它包括“git感知”。这是我非常喜欢的功能:

它还突出显示了git树中根据提交状态改变了不同颜色的文件:

Atom仍处于测试阶段(在我写这篇文章时是v0.123),但它进展很快。比Sublime快多了。新版本每周发布一次,有时甚至在同一周发布几个版本。在它短暂的生命周期中,它比Sublime发布了更多的版本,后者需要几个月的时间来发布一个新功能或修复一个错误。以下是Atom自beta版发布以来所走过的道路的最新进展:

Sublime has better performance than Atom. Simply because it's written in C++. Atom on the other hand is a web based desktop app built on top of Chromium, and while they take performance close to heart, it will be really hard or even impossible to reach the same speed and responsiveness. Last July Atom began using React and it gave it a nice performance boost but you can still feel the difference. Apart from that, if Atom’s performance issues will not push users away - Sublime better speed up the release cycle, brush up its small UX tweaks, and consider letting in more contributors because this is where Atom is winning. Atom's package ecosystem is also growing really fast, it might not be as big as Sublime's at the moment but I have a feeling that with GitHub at it's back it will keep growing even faster. It probably has the majority of IDE like plug-ins you can think of. A major difference right now is that it can't handle files bigger than 2MB so it's something to keep in mind. The one thing you'll notice first is that the Sublime minimap is gone! Other than that, the first impression is that Atom looks almost the same as Sublime. I wrote a more in depth comparison about it in this blog post. No easy straightforward way to port your Sublime configurations, packages and such as far as I know.

注意::

在Atom中,由于缓存系统的缺陷,在使用大文件时经常会发生数据丢失。

它已经被证明了无数次。

到目前为止还没有人指出的一个主要区别是(至少在Windows上)Atom不完全支持除US之外的其他键盘布局,这对一些人来说可能很重要。有一份关于这个漏洞的报告,几百个帖子已经开放了一年多(https://github.com/atom/atom-keymap/issues/35)。

可能与选择编辑有关。