HDE Advent Calendar 2014

株式会社HDEの社員がクリスマスまで毎日1記事ずつ更新

Day 24: GitHub's Atom

Hello, this is Shi Han from Malaysia and currently a part-time employee at HDE. In this HDE Advent calendar project In this HDE Advent Calendar project we already have a few posts about tools (eyes pleasing font types, balance ball and window manager) that help to improve our working environment. On the 24th post, I would like to introduce another tool which I've been using recently: Atom by GitHub.

What is Atom?

Atom is an text/source code editor developed by GitHub. The editor is free open-source, based on Chromium and written in CoffeeScript, and it supports plug-ins written in Node.js. Those who are using Sublime Text might find Atom very similar to Sublime Text with its "command palette", "multiple selections", etc. The noticeable differences between these two editors are:

  1. Sublime Text is a commercial software and costs about 8300 JPY. Atom is free (as in speech).
  2. Customisation in Sublime Text is done by editing JSON directly while in GitHub's Atom it is controlled by GUI.
  3. Atom provides a built-in package manager while in Sublime Text you would need to install Package Control.

Installation

First thing first is the installation. Prebuilt versions of Atom are available for OS X (10.8 or later), Windows (7 & 8), RedHat and Ubuntu Linux. The installation process is as simple as: 1) visit the website of Atom.io, 2) download and 3) install (no scary command lines involved). Easy, right? (∩_∩)!

Basic (Cool) Features

The Command Palette

One important keyboard shortcut you'll need to remember is ⌘⇧P, which activates the command palette and lists every possible thing you can do in the editor. In this command palette, you can search for the command that you need, e.g. to make the selected text upper case: type "upper" in the command palette and select the "Upper Case" command from the list: f:id:shihanng:20141222013131g:plain

Multiple Cursors

Next, is the multiple cursors feature which caught my attention at the very beginning. If we would want to change the word fred in our text, we can put the cursor on the text and ⌘D a few times. Atom will select the next matching string and we can modify them simultaneously. f:id:shihanng:20141222013352g:plain

To put cursors on each line, we can use ⌘⇧L on the selected text: f:id:shihanng:20141222013348g:plain

Managing Packages

Installing a package can never be easier. Open Preferences with ⌘, and choose the "Packages" tab. To a package, for example "minimap": simply search for "minimap" and click "Install" (The minimap will show up on the right side of the editor after the installation.) f:id:shihanng:20141222013355g:plain

To remove: search for the package, click "Uninstall." (◎_◎) f:id:shihanng:20141222013344g:plain

Customization

Customization of Atom can be done through the "Themes" tab in "Preferences". Installation is the same as for the packages. Having trouble choosing one? Check out the Seti UI and syntax themes.

Others

  1. You can start Atom from the command line via "Install Shell Command" (remember, ⌘⇧P). Launch Atom from terminal: $ atom <filename.ext>.
  2. For Vim power-user: you can try out Vim Mode package which turns Atom into a lite Vim editor with Atom's features.
  3. Activate live Markdown preview with ^⇧m.
  4. For developer, you can even create your own package if something else you need is missing. Of course, don't forget to share your work with us.

Summary

What have been shown are just the tip of the iceberg of what can be done with GitHub's Atom. s a text editor designed with beginners and amateur developers in mind, Atom turns out to be an intuitive tool and easy to be picked up. With the growing communities, maybe it will be the next great code editor? I know, I know, ... Vim and Emacs power users might come to me and say "but those features can also be found in Vim/Emacs." Yes, I agree, but in Atom you get the above right out-of-the-box. Maybe non-programmer users can also benefit it? For those who have some spare time during the holidays, go on and give it a try! That's all from me. Merry Christmas and Happy New Year!