Github’s Atom Editor

I didn’t set out to write a blog post about a text editor. I was going to write about one of the other awesome projects that the Ops team is doing here at Wombat. Along the way I decided to give Atom a chance again and I’m glad I did. I enjoyed it enough that I thought I would defer my post about automating my “Ops Environment” on a mac (I promise, I’ll do that one soon-ish) in favor of this.

Where I’m coming from

I generally would flip-flop between vim and Sublime. I don’t take part in the editor holy wars. I don’t have a strong opinion on spaces vs. tabs.

What’s to like about it?

I’m not going to compare it to your favorite editor. Instead, I’d like to talk about atom’s merits.

Open source

Cross platform (OSX, Linux, Windows).

Fantastic package and theme ecosystem.

Configuration is “dotfile friendly”

Atom being open source is great. It means I don’t have to worry about purchasing a license and I can use the same environment for personal projects as I do at work.

Atom is built using a several technologies that enable effective cross platform development. Under the covers it’s javascript, html, and css via Electron. If you’ve got Slack installed, you’re already running an Electron based app on your machine.

Atom has a wonderful collection of easy to install packages and themes. You can view them here. One thing I like to do there from time to time is visit the sorted list of packages and adjust the different sorting options to see popular add-ons as well as newer add-ons. I’ll discuss my favorites in a bit.

The configuration being “dotfile-friendly” is great for me. That blog post I was working on about automating my ops environment? A key component of that are my dotfiles. Atom stores it’s packages, configuration, and themes to ~/.atom so you can add that to whatever scheme you’re using to manage your personal dotfiles.

What I don’t like about it

The startup time is a little slower than I’d like. When I first used atom a year or two ago I would notice that it would chew up my battery, but that doesn’t seem to be the case anymore.

My Favorite packages and features

As far as built in features a lot of them are actually default packages, so the line gets a little blurry. Out of the box you get features like bracket matching, basic completions, split pane views, regex searching, and great theme support. Opening a directory in atom from the command line is as simple as atom <path> or atom . for the current directory.

Here are some non-default packages I’ve installed that I’ve been enjoying.

File Icons

This is an add on that functionally doesn’t do much, but one that I greatly enjoy. It adds icons next to file types in the tree view on the left. You can find it here.

Markdown Preview

Everyone likes to get the look-and-feel of their markdown right on the first commit, right? This gives you a handy preview panel to make sure content is displayed as intended.

Linters & Language Support

Atom has linters for pretty most languages and tools. I use the shellcheck linter frequently to catch best practices or potential issues in shell scripts all the time. Ansible, Terraform, Puppet, Ruby, Python etc all have their own linters as well as language support that you can add. Your mileage here will depend on what you’re trying to do.

Linter-write-good

This isn’t your average linter. This gives you suggestions about your writing in general. I don’t write much beyond email and the occasional blog post, although I do enjoy arguing with people online.

Linter-write-good will give suggestions on how to improve your writing, which is great for blog posts or READMEs. As an example this blog post has some items that I’ll need to address before publishing:

Not everything is suggests necessarily needs to be fixed, but it’s nice to be aware of them as a spot check.

Fuzzy Finder

A lot of Vim users will have one of the plugins for fuzzy searching. Atom is no different. The keyboard commands to use the feature even hint at it’s inspiration. https://atom.io/packages/fuzzy-finder

The plugin indexes your project and you can start typing a filename to quickly open it. This is especially handy when tree-view is hidden and screen real estate is at a premium.

Git-plus

Atom has basic git integration out of the box. It’ll do nice things like colorizing files and directories in the tree view based on their git status . That’s nice for getting a quick of what’s what, but if you just need to make a quick pull or a commit the git-plus plugin has you covered.

Merge Conflicts

While we’re still talking about git, merge-conflicts is also useful. It give you a handy UI for taking care of merges if you’d like to do that within Atom.

Conclusion

I’m happy that I gave atom another look. It has definitely earned a place in my toolbox. It’s free, customizable, cross platform, and a pleasure to use.