A back button/gesture


Can we please please please put a back button in this application. As in, when you were just on a page, you can go back to the page you were on. It could be backspace, or like in Apple’s XCode, you can just two finger swipe back and it takes you back to the previous page. It’d be really great if there were a keyboard shortcut, so you could rapidly switch between two document without having to scroll or anything.

This is one of those little things that is immensely helpful, and it would be really great if someone could add this functionality!

I would do it myself, but I’m not quite there yet.


I’m not sure I understand what you’re asking for. Atom isn’t meant to be used as a normal web browser, so it doesn’t have anything like a web browser’s viewing history to “go back a page.”

If you’re using the web-browser package, it already has a back button.

If you mean that you want to reopen a file that you had open and then closed, there’s already a shortcut for that. In the command palette, you’d search for “reopen,” or the default keyboard shortcut is Ctrl-Shift-T.


On OS X, many applications support the “back” gesture (two-finger swipe to the right by default) because it is so easy for those of us who use the Magic Trackpad. There are many situations where a forward/backward navigation paradigm can be applied … when editing Contact records (records of any kind really), when moving between your Timeline and Conversation views in a Twitter client, navigating filesystem hierarchies, moving between lists (where scrolling the list is the familiar up/down motion), etc.

It’s not that much of a stretch to apply that paradigm to navigating from place to place within a structure of code.


There is already a shortcut (if I understand correctly what you’re after). The function is pane:show-previous/next-item, bound by default to cmd-alt-left/right.

I don’t know if Atom has any gesture support, but if/when it has, it should be easy enough to bind left/right swipes to these function.


Oh, and if you want next/previous cursor positions within a file, there’s a Last Cursor Position package available. Haven’t tried it.


I use last-cursor-position and it functions nicely with the exception that it harmlessly throws an exception now and then. I haven’t tracked down what causes it.


That just shows the next tab. It doesn’t actually show that last file that was accessed. If you look at XCodes gestures you can see it.


Yes, I know what you’re after, but am new to Atom and misinterpreted what previous/next item is doing.

Give the Tab History package a try. AFAIK Atom has no gesture support, but using this package with keybindings might do you for the time being.


For those who aren’t grokking what the OP is after, try opening about 40 files in tabs, in, say, a RoR project, where many files have the same name. From index.html.haml, go edit the controller file, then try to find which view template (only about 20 index.html.haml tabs…) you were in last… Impossible. You have to hit Command + T and find the name of the parent directory to get to the right template.

Since a picture is worth 1000 words, here is my tab-bar:

With a back button, this problem is solved. It’s a great addition, and present in many IDEs.


There is also the foldername-tabs package which shows foldernames in the tabs. Totally different solution to this problem.

That said Cmd-B shows a list of open tabs, and the most recently selected one is at the top.


I don’t see the Tab History package. Do you have a link?


Can’t attest to its current status, as I’ve been solidly in IDE-land for quite a few months.


I’ve found history tracker https://atom.io/packages/history-tracker works well, Ctrl-Cmd-left/right moves you between files