tl;dr last-cursor-position, advanced-open-file and highlight-line

Sorry, for the sensationalist headline on this blog post. Almost all of Atom, including the core functionality, is based on packages. For example, the autocomplete thing that pops up whilst you're typing is a package with its own git repo and README. However, it's not a community package. Let's focus on those instead.

Number 1


If you're in the midst of typing and for some reason you need to scroll somewhere else in the code to type something or to select to copy to the clipboard, how do you get back? You can either memorize which line you were on. Or you can split the windows so that when you're done, elsewhere, you just kill the newly created split-window. Or; you install last-cursor-position.

At any time you can press alt-- (that's alt and the minus character) and it'll go back to where the cursor was last.

It works across open tabs too. So if you switch tabs to edit index.html and want to go back to that you were working on you can alt-- yourself back there. And suppose that you want to go back to index.html again, you hit shift-alt--.

Number 2


This was written by a friend of mine called Michael "Osmose" Kelly and this was his first package he wrote. It's apparently very popular and Michael's most popular Open Source project to date.

What it does is introduce a command-line looking prompt for opening files. By default, you start it with Ctrl-x Ctrl-f which is the Emacs command for opening files/buffers.

Don't get me wrong, I love using Cmd-t to fuzzy-find files and that's awesome too, but sometimes when you have eleventeen files called and you want the one in the "current directory" it's much easier to just go directly to that file. I type Cmd-x Cmd-f m [TAB] [ENTER] and I'm there. Had I typed m on the fuzzy-finder it would certainly have yielded too many files.

Another really really useful thing about this package is that I can easily go to any other file outside the current directory. Suppose my Atom window is rooted in ~/dev/PYTHON/premailer/ and I want to open /tmp/hack.js I easily can, thanks to this package without reaching for the mouse.

Number 3


The name well describes what it does. But why do I need it? The answer is simple; it's when I jump around. When I'm in the midst of typing a function or snippet or something I don't need to know which line I'm on because things are settled. No, it's when I go somewhere else, for example using the last-cursor-position package, then it's hard to see where the cursor is. Especially relevant when you have a big screen with high resolution.

Why isn't this a core package?!

In Summary

I bet I've forgotten some package that I love and use every day that isn't a core package. If so, it's probably something subtle or something that I almost take for granted. For example, who doesn't use react or atom-beautify?! Also, those packages are already so popular they don't need a blog post to raise their attention and fame :)

What was your favorites that you like so much that they just need to be highlighted? Leave a comment or discuss here.


Post your own comment
Bill Pearce

Thank you for this! Last-cursor-position looks amazing. Will have to get into the habit of using it.

A couple of my favourites:

-'Sublime-style-column-selection', a package that gives you multi-line text selection with the mouse
-'Transform', a package that lets you modify selected text, to be, say, uppercase, or underscored, or titlecased, or "humanize'd".
-'atom-macros', a package that lets you compose your own macros with coffeescript, including executing console commands or any kind of javascript

nathaniel offer

Nice post. I'll definitely be checking out "last-cursor-position" that cross file/tab feature will be most useful. Also side note you've got a tiny typo in your last code snippet in the last-cursor-position section. You typed shirt instead of shift.

For me I couldn't write websites without w3c-validator. I know that's a boring choice but knowing each and every time you save a webpage that it validates just makes me happy because it means I won't be wasting time later debugging. The next one is "emmet" I love this little plug in. Being able to take a list of text, highlight it and wrap it in ul>li tags complete with classes and if needed link tags as well is just mindblowing.

Peter Bengtsson

Thanks for the typo note. Updated now.

With regards to html validation; what are you referring to in terms of an Atom package?

nathaniel offer

The package is exactly as I wrote it "w3c-validator"

Peter Bengtsson

Interesting. I'll try it out. Oftentimes for me, my .html files contain Jinja or angular or some other crap that makes it non-xml-based file.

Graham Hannington

For HTML5 or XHTML5 validation in Atom either on-the-fly or only when you save, try the linter-vnu package.

krutik khatri

You can also use for the yaml validator as well as yaml converter to json,csv,xml,base64 also for beautify and minify YAML.

Your email will never ever be published.

Related posts