Remix.run Logo
Xiol32 21 hours ago

I really wanted to like Helix, and for the most part did, but there is something about the way undo works that just feels incredibly wrong to me. What it wants to undo doesn't always seem logical and always undoes too much. I've lost work because of it in the past.

suby 20 hours ago | parent | next [-]

There are two things that consciously bug me about undo,

* When you press undo, and the content to be undone isn't on the screen, it will jump your screen to the relevant section (good) but also with that same keypress actually undo the content (bad). Other editors, if the content is not on the screen, will not perform the undo action unless the content is actually visible. When I press undo in Helix, I'm always taking a moment to figure out what has actually changed because of this.

* This is a conscious decision by the Helix creator, so it's unlikely to change, but undo is not granular enough. It's chunked per insert mode operation. So you could type the entirety of a tale of two cities while in insert mode, you could be in insert mode for 30 minutes, and then go back to normal mode -- at this point, if you press undo once, the entirety of what you did in insert mode is undone. There is a feature where you can explicitly give the editor a save point for undo, and you're expected to press the key manually at your desired undo points. I really don't like this at all. I have bound some keys such as spacebar to this save point, so I get more granular undo, but this has some consequences such as clearing any selections that are currently present. I couldn't figure out a way to fix this without any side effects unfortunately.

I like Helix a lot, and I have no intention of changing editors, but there are some default behaviors which I think are absolutely baffling, and the undo granularity + expectation that you manually save checkpoints for undo is one of them.

aquova 20 hours ago | parent | next [-]

> Other editors, if the content is not on the screen, will not perform the undo action unless the content is actually visible.

Really? What editor does this? Vim/Neovim definitely will undo the change with a single 'u' press, and every GUI editor I've ever used will undo the change immediately with a single ctrl+z.

suby 20 hours ago | parent [-]

Ah, thanks for the correction. I'm wrong on how common this is.

I just tested CLion, VS Code, and Sublime Text. I thought all three behaved as described, but only CLion did. I wish it was more common though, I find it a lot more intuitive and clear on what's happening.

peterashford 18 hours ago | parent | next [-]

Just tried Goland and it works the way you describe. Emacs is immediate restore. CLion and Goland are both JetBrains IDEs, so no surprise they use the same mechanism. FWIW, I like it and think it's preferable.

aquova 20 hours ago | parent | prev [-]

Huh, that's interesting. I've only used VSCode and Sublime, never CLion. I'm honestly not sure how I'd feel going the other way, but I could see the behavior being annoying if you're not expecting it.

19 hours ago | parent [-]
[deleted]
eviks 13 hours ago | parent | prev | next [-]

What happens if you can't fit all changes into one screen? Does it jump to a random /last edit but undoes all the changes?

By the way, I find this forced move rather annoying sometimes, especially when I want to jump back and forth (undo/redo) and this behavior blocks visual comparison by constantly shifting the view

20 hours ago | parent | prev [-]
[deleted]
latexr 20 hours ago | parent | prev | next [-]

I agree the undo is sometimes a bit weird, as is the “repeat last command”. However, the rest of it is so nice that I keep Helix as my main editor.

How did you lose work, though, could you not redo?

Xiol32 18 hours ago | parent [-]

I think I panicked at the amount it has undone and then in my attempt to redo, made a change and got myself into a mess with the history. It was quite early on in my time with it.

13 hours ago | parent | prev [-]
[deleted]