Closed ssfrr closed 5 years ago
What's the desired behaviour here, i.e. which of the following to we want to keep track of:
@edit
etc.If I’m understanding correctly I’m focusing on 2. 3 would be cool as well but it seems like it might be harder to catch a call to @edit
, and there isn’t a well-defined cursor position to return to if there’s no file in focus because you’re typing it into the REPL.
The idea would be that every time go-to-symbol
is invoked it would push the cursor position to a stack, and then return-from-goto
would pop from that stack and jump you back where you came from. This would make it really quick to trace through code.
Makes sense. I tried implementing this over the weekend with all four options, but that didn't feel great (and meant that there's lots of weird heuristics necessary to collapse e.g. the event emitted from changing to a file and from going to a line in a file etc).
Implementing 3 is fairly trivial, but I'm not sure if we'd even want that -- suppose you click on a profile frame: Would you want to have that in your "navigation history"?
I just discovered the
goto-symbol
functionality, which is super nice. One thing I'm missing from previous experience withctags
invim
is a quick way to return to where I came from. It's pretty common for me to want to pop into a definition and then pop back out quickly.