Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



> 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.


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.


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.


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.


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




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: