🏠 back to Observable

How to go back to the previous cell

I love the cmd + J (or alt + double-click) shortcut to go to the cell where a variable is defined and I think it would be great to provide a way to do the reverse journey: go back to where I came from.


I think the easiest way to implement this would be leveraging the browser’s history.

That would mean appending #name to the history whenever a cell is visited via cmd + J or alt + double click.

Since 99% of the time I just want to do a single jump back to the previous cell, using my browser’s back button would work great.

Please don’t do this. Adding a browser history entry every time a cell gets edited (even limited to times when navigation is done via clicking in the notebook overview or command-J on a cell name) would be obnoxious.

Some other mechanism for navigating back through a stack of recently edited cells could be nice though.

Hi Jacob, thanks for chiming in.

This point is key. Modifying the history every single time you click on a cell would be overkill. Only doing it when following a variable reference would be a simpler alternative to implementing a proper cursor history tracking system, which I suspect would take much longer.

It’s not the most elegant solution but it would work for most cases. It would also not be that hard to add a user setting to disable/enable it.

Noted. Logged this as a feature request.

1 Like