|
|
Subscribe / Log in / New account

The Atom code editor turns 1.0

By Nathan Willis
July 1, 2015

GitHub recently announced the release of version 1.0 of Atom, its open-source code editor. Functionally, Atom is similar to Emacs, Vim, and many other extensible text editors aimed at developers. But it differs in other respects, starting with the fact that is a local application built on web technology. Naturally enough, Git (and GitHub) support is also integrated, and the size of the GitHub community means that the project already has a large fan base.

[Editing in Atom 1.0]

Development on Atom started in 2008 as a side project from GitHub co-founder Chris Wanstrath. In 2011, it became an official GitHub project. Although the early incarnations of Atom were an in-browser web application, the recent builds—including the 1.0 release—are packages that can be installed and run locally. Under the hood, however, they incorporate a modified version of the Chromium browser and Node.js. That makes the downloadable bundle on the hefty side: the Debian and RPM packages are around 70 MB. In addition to Linux, Atom runs on Windows and Mac OS X.

Installing and learning one's way around Atom 1.0 is straightforward. The bundle is self-contained, so there are no dependencies to worry about. The editor features built-in syntax highlighting, automatic indentation, a range of available UI color schemes (which can be further modified through a user stylesheet), and customizable keybindings. Hard and soft line wrapping are available, as are settings to display a variety of "invisibles" like white-space characters, carriage returns, and EOL characters.

That said, there are a few niceties in the basic editing functionality that go beyond the bare minimum. For instance, one can open up an HTML preview of Markdown-formatted text with a single keystroke, collapse or expand blocks of code, or "zoom" in and out (by changing the font size) with the mouse wheel. One of the most convenient features, though, is the "command palette." The keystroke Ctrl-Shift-P pops up a modal dialog window that can be used to search for commands. It is akin to command completion in Emacs, but with a live-updating list of matches.

[Editing with the minimap package]

The code for Atom itself is under the MIT license, as is the case with the Atom add-on packages developed at GitHub. There are, however, third-party packages which may be published under different terms. Atom is written in CoffeeScript, as are many of the available add-on packages. And it is the availability of add-on packages that makes Atom particularly noteworthy.

For general-purpose code editing, arguably the most direct competitor to Atom would be Adobe's Brackets or the the Ace editor from Cloud9. All have roots in web development and are written in a JavaScript-like language.

But both Brackets and Ace make a point of aiming for simplicity; one of the design goals for Atom is to provide the same level of extensibility found in Emacs and Vim. Indeed, there are clear similarities with Emacs to be found in Atom. The majority of the functionality found in the default setup is implemented with a suite of more than 70 individual packages. As is the case with Emacs, this architecture allows external packages to make significant changes to how Atom operates.

At the moment, there do not appear to be packages that bring major new, non-editor functionality to Atom (in the manner of the Gnus news-and-email reader for Emacs, to name one example). Although there are a few packages that provide minor new features, such as showing weather information. But there are more than 2,100 packages available, many offering improved support for specific programming languages, better integration with the host OS, and editing conveniences like whole-file overviews, navigation aids, and code-analysis tools. Atom includes a built-in package installer and search tool; each package description includes screenshots (which can be animated), home page links, and more.

[Atom's built-in package browser]

It should be noted for the record that a significant percentage of the Atom packages available so far are syntax-highlighting schemes. Such themes are supposed to be packaged and promoted separately from the main package archive, a distinction that does not seem to be enforced. This makes it hard to estimate how many genuinely useful packages are available at the moment, but it is clearly a large number.

The category with the most packages, though, is Git support. Atom comes with basic Git support included. The built-in tools let the user check out branches, track the status of files, and stage and commit changes. Interestingly enough, though, the basic Git functionality does not include pushing a commit, making a pull request, or a number of other features. There is also a set of built-in keybindings that implements a form of GitHub integration, but it relies almost entirely on jumping from the editor to the GitHub site in a separate browser.

For example, there is no built-in way to view git blame information in Atom itself, but the "Alt-g b" key combination will open the corresponding blame-annotated file at GitHub—assuming, that is, that the repository in question is hosted at GitHub. These limitations seem a bit odd, although perhaps users with less allegiance to GitHub will be happy to know that the Atom editor is not tightly bound to one particular service provider.

In any case, there are dozens of third-party Atom packages that extend the editor's Git functionality, starting with the popular git-plus package. Other packages provide enhancements to how diffs are displayed, generate graphs of commit activity, and so on. There are also several popular packages for integration with other services, including Travis CI as well as GitHub competitor Bitbucket. The package-development community is clearly active, and it would appear that GitHub is letting that community have a free rein.

IDE-like functionality is not yet as advanced as version-control support. There are several competing third-party packages for hooking into a compiler, but the vast majority are limited to use with CoffeeScript, LESS, and other web-development languages—in which the "compiler" is more akin to a pre-processor than anything else. [Installing a package in Atom]

Ultimately, whether or not Atom should find a place on one's desktop (alongside Emacs or Vim, much less replacing them) is an open question. The main selling point seems to be that Atom offers programmer-friendly extensibility in a language that is familiar to more of the "development community" at present. CoffeeScript is, after all, an extension of JavaScript, and there are far more individuals on the web today who have some level of JavaScript experience than there are individuals who have used Common Lisp.

But that is no guarantor of success. Emacs and Vim have remained as popular as they are today because their add-on communities enhance the editors' built-in functionality. Perhaps Atom will attract a sizable community of package developers, but one that never pushes the boundaries beyond somewhat-better Git integration and extensive theming. Whether or not Atom manages to grow beyond those boundaries will determine if it becomes a first-level programmer's editor or remains more of a user-friendly interface to Git and GitHub. Neither is a bad outcome, but they will have distinctly different influence on the development community.


to post comments

The Atom code editor turns 1.0

Posted Jul 2, 2015 5:38 UTC (Thu) by ncm (guest, #165) [Link] (4 responses)

Common Lisp? Somebody did write an Emacs-alike in Common Lisp, may he R. I. P. But Emacs Lisp, like Jeane Kirkpatrick, is nobody's baby.

The Atom code editor turns 1.0

Posted Jul 2, 2015 9:49 UTC (Thu) by rsidd (subscriber, #2582) [Link]

The article's point was that more people are familiar with Javascript. While Emacs Lisp is indeed nobody's baby there is a Scheme-based emacs (GuileEmacs) and, if it ever becomes mainstream, it is even possible that it will support extensions in other languages including javascript (as discussed in this LWN article some months ago). In the meantime, people like me stick to emacs largely out of inertia...

The Atom code editor turns 1.0

Posted Jul 2, 2015 22:49 UTC (Thu) by n8willis (subscriber, #43041) [Link]

The distinction, though, is that somebody _might_ have Common Lisp experience without having Emacs experience. To accrue Emacs Lisp experience, though, one would have to get exposed to Emacs.

Nate

Common Lisp

Posted Jul 9, 2015 6:40 UTC (Thu) by oldtomas (guest, #72579) [Link] (1 responses)

There's the cl package[1].

While not "the whole Common Lisp monster" (that would be a tall order), it does enough of it that some coming from there feels at home (including those funky loops). And it's included in the base distribution.

Besides it's a great showcase of the malleability of a Lispy language.

[1] https://www.gnu.org/software/emacs/manual/html_node/cl/Ov...

Common Lisp

Posted Jul 15, 2015 18:45 UTC (Wed) by nix (subscriber, #2304) [Link]

And if you want some of CLOS (definitely not all of it!) there's the wonderfully-named EIEIO.

The Atom code editor turns 1.0

Posted Jul 2, 2015 10:58 UTC (Thu) by jzb (editor, #7867) [Link] (3 responses)

"Emacs and Vim have remained as popular as they are today because their add-on communities enhance the editors' built-in functionality."

Not to mention muscle memory... Once you've been using an editor for years, the thought of having to learn a new set of keybindings / commands really doesn't appeal. A lot of editors have vi- /Vim-like keybindings, but I've yet to find one that takes that far enough. Little inconsistencies are productivity killers.

The Atom code editor turns 1.0

Posted Jul 9, 2015 10:15 UTC (Thu) by nye (subscriber, #51576) [Link] (1 responses)

>A lot of editors have vi- /Vim-like keybindings, but I've yet to find one that takes that far enough. Little inconsistencies are productivity killers.

I think the problem is that, when your editor was fundamentally never designed around the idea of fully composable commands, it's hard to retrofit them. This leads to lots of individual commands having to be added individually and it's impossible to implement all of the possible combinations that way.

Last year when I was first looking at Atom I read an article which discussed this pretty well: https://medium.com/@mkozlows/why-atom-cant-replace-vim-43....

The Atom code editor turns 1.0

Posted Jul 9, 2015 19:19 UTC (Thu) by drag (guest, #31333) [Link]

Instead of doing things like 'deleteLine()' it should of been 'delete(Line())'.

Then you can do things like add new functions that return regions of text or coordinates like 'EndOfLine()', 'BeginningOfLine()', 'ToClosingBrace()'. Then something like 'Lines($starting, $number_of_lines)', were the numbers number of lines can be positive or negative depending on what direction you want to go. Then the same thing for 'Words()' and 'Blocks_of_code()' and such things.

So you could do 'delete(Words(-2))'

Then for new language bindings they would need somebody to go through and define what a block of code is or what a word is and that sort of thing.

The Atom code editor turns 1.0

Posted Jul 9, 2015 19:04 UTC (Thu) by drag (guest, #31333) [Link]

> A lot of editors have vi- /Vim-like keybindings, but I've yet to find one that takes that far enough.

Evil for Emacs does all the vim things I need, personally. I find vi to be better then emacs bindings, but emacs is a better scripting environment then vim.

sublime-text

Posted Jul 2, 2015 13:42 UTC (Thu) by prauld (subscriber, #39414) [Link]

This seems to be more like a re-implementation of the sublime-text editor. The open source-ness is a nice plus but it seems much slower, less responsive. Maybe as it matures it will get better.

The Atom code editor turns 1.0

Posted Jul 2, 2015 14:49 UTC (Thu) by flussence (guest, #85566) [Link] (1 responses)

I wonder if it could've been done in significantly less than 70MB if xulrunner was still maintained.

The Atom code editor turns 1.0

Posted Jul 9, 2015 22:53 UTC (Thu) by bronson (subscriber, #4806) [Link]

Probably, but it would ship until 2018 and require scary changes to xulrunner. There's a reason so many xulrunner projects were started and so few released anything.

International keyboard on MS Windows

Posted Jul 3, 2015 0:13 UTC (Fri) by jnareb (subscriber, #46500) [Link] (3 responses)

The major problem with Atom, at least on MS Windows (beside the fact that it is sluggish; at least Atom provides trace how much startup time is each plug-in that you use) is that it doesn't support correctly international keyboard.

The problem is that on MS Windows the AltGr (left Alt) combination is identical to Ctrl-Alt combination - to support keyboards without left alt, e.g. on notebooks and other small laptops. The problem is that Atom uses many Ctrl-Alt combinations for itself, so that AltGr-o for 'ó' runs some Atom function instead of entering 'ó'.

See https://github.com/atom/atom-keymap/issues/35

International keyboard on MS Windows

Posted Jul 4, 2015 6:25 UTC (Sat) by ibukanov (subscriber, #3942) [Link] (1 responses)

Apparently the problem has been known for quite some time. As the linked bug suggested the best option for Atom would be to stop using Ctrl-Alt-letter shortcuts as those violates AltGr Windows aliases. And if IDE needs so many shortcuts that [Ctrl|Alt]-[letter-digit-space] is not enough, they should support shortcuts with prefixes and typing of commands like Emacs or Vi allowed for ages.

International keyboard on MS Windows

Posted Jul 5, 2015 17:11 UTC (Sun) by bronson (subscriber, #4806) [Link]

They do, for both.

For example, ctrl-K is the pane prefix (https://atom.io/docs/v0.99.0/getting-started#split-panes): ctrl-k ctrl-b opens/closes the file pane, ctrl-k up-arrow opens a split above the current pane, etc.

In addition, every Atom shortcut binds to a named command. To run it directly, bring up the command palette (ctrl-shift-p) and start typing the name. The autocompletion works very well -- it's easy to guess the name of a command. In fact, it's so easy to use I rarely use a lot of the shortcuts. It's quicker to type '<ctrl-shift-p> mark <return>' than remember the combination to bring up the markdown preview.

If it's not obvious, I'm really digging atom... there's still a lot wrong with it, but it's very usable and the pace of development is really impressive.

That said, there are a few bugs that I think should have blocked v1.0 until they're fixed. The linked bug is definitely one of them. Lack of block select is another, the tendency to go insane when opening minimized files is a third... but I suppose perfection is the enemy of good enough.

International keyboard on MS Windows

Posted Jul 9, 2015 7:21 UTC (Thu) by Darkstar (guest, #28767) [Link]

It is perfectly possible on MS Windows to distinguish AltGr from Ctrl+Alt. Many programs and games can do it. The fact that it doesn't work with Atom probably just means that the underlying framework (Chromium) is handling these keys incorrectly. Maybe a bug should be filed there?

The Atom code editor turns 1.0

Posted Jul 9, 2015 4:34 UTC (Thu) by scientes (guest, #83068) [Link] (1 responses)

> they incorporate a modified version of the Chromium browser and Node.js

Are you telling me my text editor is going to take 4GB of RAM to compile? And people say emacs is bloated....

The Atom code editor turns 1.0

Posted Jul 9, 2015 15:24 UTC (Thu) by perlwolf (guest, #46060) [Link]

Back when having 2 Mb of main memory meant you had a very large departmental computer, it was snidely claimed that EMACS was an acronym for "Eight Megabytes And Constantly Swapping" to refer to its huge (for the day) footprint. A few decades of Moore's Law make that very dated.

The Atom code editor turns 1.0

Posted Jul 9, 2015 18:09 UTC (Thu) by sramkrishna (guest, #72628) [Link] (3 responses)

GNOME Builder has a lot of these features, and it supports VIM and Emacs bindings. The author loves vim and didn't want to sacrifice that while writing an IDE. Git integration is happening, as well as debugging and various other things. I encourage you to check it out if you're interested in not just an editor but an entire IDE for the UNIX geek.

https://wiki.gnome.org/Apps/Builder

https://www.indiegogo.com/projects/builder-an-ide-of-our-...

https://wiki.gnome.org/Apps/Builder/Features

If you have a mind, come join us and help out!

The Atom code editor turns 1.0

Posted Jul 10, 2015 4:00 UTC (Fri) by mathstuf (subscriber, #69389) [Link] (2 responses)

Is it Vim binding or vi-like bindings? Basically, does 'vipgq' (visually select the current paragraph and word wrap it to the current textwidth) work without being a special function?

The Atom code editor turns 1.0

Posted Jul 10, 2015 5:13 UTC (Fri) by sramkrishna (guest, #72628) [Link] (1 responses)

It's sort of both. For instance, if you do a :wq or something like that it does work. So it does have that modal model where you can go from one to the other. What is impressive is that the bindings was done in CSS.

The Atom code editor turns 1.0

Posted Jul 10, 2015 18:10 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

Well, `:wq` is an obvious one. What I mean is whether they have "bindings for vi keys" or if they have the actual verb/noun separation which is where the actual power of Vim comes from.

The Atom code editor turns 1.0

Posted Jul 14, 2015 22:01 UTC (Tue) by meyert (subscriber, #32097) [Link]

Join team jEdit now.


Copyright © 2015, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds