Enhance scroll-to-cursor


A couple of suggestions for scroll-to-cursor:

When the cursor is off the screen, scrolls the cursor to the center, as expected. I was surprised it didn’t center when the cursor was visible but at the top or bottom of the view.

Even better, consider doing what emacs 24 does with their recenter command: keep pressing to cycle among center, top, and bottom. Very handy.

Is there a way to determine what package a command belongs to? For example, I’d be happy to contribute for things like this, but it’s hard to tell where to start.


Since the core is not available for hacking yet I’ve published this enhancement as the center-line package.

Scrolls the cursor to the center of the screen. Repeat to cycle between the center, top, and bottom of the screen.

This is similar to the built-in Editor:Scroll To Cursor but adds the support for scrolling to the top and bottom. Also, as of Atom 0.84, Editor:Scroll To Cursor does not scroll the cursor to the center of the screen if the cursor is already visible.

It is bound to ctrl-l which overrides the built-in.

Once Atom’s core is in a public repository, I’d like to propose this get moved into the core to replace Scroll To Cursor since it is a simple but useful superset of it.