Sublime Forum

Soft undo without the undo, just move

#1

Soft undo combines 2 common actions into one:

  • moving through the modify buffer
  • moving the cursor (and by this, the current view)

Sometimes I want only the latter. For example, let’s say I’m working on a function and I see something I want to refactor. I fix it in the single function I’m currently on, but I remember I have a few, similar occurrences in my code, so I quickly find them (using Ctrl+F/Ctrl+G/whatever) and then I want to get back to where I was previously editing. I can use Ctrl+U for that, but it’ll undo my changes :frowning:

Any idea? (or a similar capability of ST for this use case).

Thanks, Yonatan

0 Likes

#2

There are jump_back and jump_forward commands. By default it’s ctrl+minus and ctrl+shift+minus on macOS. Is that what you’re looking for?

0 Likes

#3

Yeah, that’s it. In Linux, it’s alt+- for jump_back and alt+shift+- for jump_forward. I found it a few days ago but forgot to update here… :frowning: So thanks for reminding me.

0 Likes