Posted by HexDecOctBin 10/26/2024
Ask HN: Alternative to Emacs with undo-tree functionality?
PS: I know that Vim has it, but I've never been able to get comfortable with Vim and other Vim-like editors.
There's also been some good advice on dealing with your performance hiccups. I'd like to add that you should look at what packages you're running and what you're loading from your init file. In my 30ish years of experience using Emacs (omg, yes 30 :(), negative performance has almost always been directly related to packages, and not Emacs itself. Case in point... in the early 90s I was having issues with syntax highlighting multi-megabyte (as in more than 1 and less than 10) files. Changing font locking (syntax highlighting) to use this new fangled "lazy-lock" package fixed all my issues. I don't think I've had a performance issue since. So, look at your init file. Cut some chaff out of there. Got a fancy VCS front end? Don't use it for a couple of weeks. Performance issues go away? Submit a thoughtful bug report; help yourself and others.
If you do want to switch, do it. But give VIM another try, and specifically Neovim. Personally, I recently challenged myself to do a "Lua-only-no-arrow-keys Neovim" and I've been loving it. I've used vi/VIM as long as I've used Emacs, but I'm not by any stretch a "power user". So, maybe I've had a bit of a head-start being comfortable with movement and selection, etc. But everything else has made migration easy. The online resources, the inline help, the package ecosystem; all of it. Even discovering the "toy" packages has been fun. Want ducks wandering around your active buffer? Yeah, Neovim has that.
"IDE" fads come and go, myself and many others on HN can probably give you quite a list, but as far as editors go Emacs and VIM/Neovim are in a class by themselves. Take advantage of what they have to offer, even if it means diving a bit deeper.
There seems to be an undo-tree vim package that looks like what you want here[0] so you could check that out?
I am sure you have tried all these, but just listing them if you havent:-
1. lib-gccjit native compilation
2. GCMH
3. explain-pause-mode
4. Buy a new PC
5. Compiling emacs with -O3 for your own hardware
6. --with-x-toolkit=lucid
Please dont abandon emacs in haste. It was home for 10 years for good reasons.
Would somebody please explain to me how 'casouri/vundo' compares to the semi-abandoned 'emacsmirror/undo-tree'?
Also, for those of you who didn't know what GCMH was:
https://github.com/emacsmirror/gcmh
> GCMH - the Garbage Collector Magic Hack
> Enforce a sneaky Garbage Collection strategy to minimize GC interference with user activity. During normal use a high GC threshold is set. When idling GC is triggered and a low threshold is set.
I originally started using Emacs because its haskell-mode and erlang-mode beat anything out there. (I stayed for a lot of other things, too.)
I stopped using Emacs because of its poor LSP support. VSCode's Haskell LSP was better.
I briefly tried to reboot using Doom Emacs for Rust development this year, but the LSP support was still quite terrible.
There are reasons to stop using something after 10 years.
(Also, I've been using Vim on the side 1997-now. It never dies, but I never turned it into an IDE.)
In my opinion there is too much to fix for me to enjoy Emacs, compared to the alternatives.
Yes I'm multiplexing my SSH connections through a master control, yes I've tried other SSH modes, yes I'm using a dumb terminal on the other side... it still communicates at the speed of suffering.
(setq vc-ignore-dir-regexp
(format "\\(%s\\)\\|\\(%s\\)"
vc-ignore-dir-regexp
tramp-file-name-regexp))
VC is quite chatty and assumes that filesystem operations have a negligible cost. Before I disabled it, VC was adding >1 second to every find-file operation over Tramp.I also recommend using the direct-async-process connection property[2], which significantly decreases the latency of async process creation.
[1] https://www.gnu.org/software/emacs/manual/html_node/tramp/Fr...
[2] https://www.gnu.org/software/emacs/manual/html_node/tramp/Re...
I'm seeing ~ 7 seconds of delay compared to the excrutiating ~20 seconds I was seeing before.
Is it really TRAMP that is slow, or is the SSH connection already slow? I think there can be noticeable delay with TRAMP, but if it is so much, that it is bothering you, then maybe the SSH connection to the server itself is slow? For example, when I connect to a local machine, it is fast for me, so I am guessing most of the delay comes from the connection itself.
Stable and fast with EMACS-style behaviour and key assignments.
Has C-like extension language named EEL that you could convert / re-write the vundo tree in.
It is not just lisp technology, it is four decades of developers (excellent and not so excellent) committed to improving the tooling within a framework fundamentally designed for developers to improve tooling. VS Code was designed to be user friendly. VIM to be done. Stallman never intended Emacs to be either. TANSTAAFL. Good luck.