Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Alternative to Emacs with undo-tree functionality?
16 points by HexDecOctBin 34 days ago | hide | past | favorite | 23 comments
I have been using Emacs for about 10 years and am getting tired of its idiosyncrasies and performance hiccups. I tried a bunch of alternative editors with scripting support (most recent being TextAdept) but none of them seem to have a native Undo-Tree [1] features or an API powerful enough to build it. So, I am asking here: are there any non-Electron based editors with a reasonably decent scripting layer or a plugin system, and 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.

[1]: https://github.com/casouri/vundo




I created an account just to echo what's already been said. There's been some good reasons already given on why you should stick with it. These are mine. Don't give up on Emacs. You've spent 10 years investing in it and making it your editor, so invest a bit more and ask about those specific idiosyncrasies. Investigate those performance hiccups. Get on the mailing list. Ask (and answer!) questions on SO and emacs.SE. Thoughtfully engage with the community.

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.


I'm also in the emacs camp, but no-one seems to have addressed your undo-tree requirement in the comments I've seen!

There seems to be an undo-tree vim package that looks like what you want here[0] so you could check that out?

[0] https://github.com/mbbill/undotree


> performance hiccups

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'?


I can also vehemently endorse Andrea Corallo's work on native-comp/libgccjit. The compilation can be finicky so I recommend looking at the AUR script here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=emacs... or this lovely article: https://www.masteringemacs.org/article/speed-up-emacs-libjan...

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 used Emacs from 2012-2018.

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


Just help improving it. There are many reasons to stick with something after a decade, especially something as powerful as emacs. LSP support is fixable.


I’m not interested in writing Emacs Lisp. It is not just the lack of LSP support, but also that after 6 hours of configuring, I don’t have an IDE that just works. VSCode, Zed and Neovim all have less legacy and fewer moving parts I need to be concerned about when starting from scratch.

In my opinion there is too much to fix for me to enjoy Emacs, compared to the alternatives.


That is a big ask when one could instead be productive using VSCode which has fantastic LSP support and use emacs or vim keybindings in that IDE for editing without having to retrain muscle memory.


TRAMP is killing me. I have my Emacs setup the exact way I want it, but trying to work on a production server through Emacs is torture.

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.


Try disabling VC over Tramp connections[1]:

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


Thanks for this! I've realised that Magit does not seem to rely on VC so I'm quite glad to disable VC checks completely.

I'm seeing ~ 7 seconds of delay compared to the excrutiating ~20 seconds I was seeing before.


Run Emacs in screen on the server instead?


That means transferring my convoluted setup there too, and I'm not alone on the server. TRAMP really is the best mode here, it's just slow


Other people run even spyware (VSCode) on servers under the guise of collaborative editing.

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.


The connection seems responsive over a terminal, I think its the Emacs handling of it that's the main slowdown


That still is a nice setup really; I use it quite a lot. Termius on ipad -> server with emacs in screen. Works well.


Epsilon editor from https://www.lugaru.com/

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.


I love that Epsilon is still live and kicking. I've only ever met one person who used it but he was truly at one with the editor and traversed a large complex codebase with ease.


I used to use ϵpsilon, but then 32 years ago I got access to GNU Emacs, and I didn't look back. Maybe it's gotten better since then.


Does it support syntax highlighting for modern languages? What about having multiple languages in one file (.tsx or .heex, for example)?


There are alternatives to Emacs. Unless you want Emacs :) Architecture is what makes Emacs Emacs. Sure other scripting languages are Turing equivalent to eLisp. But there be tarpits.

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.


10yrs is a lot of time ...give vim another try :)


I think Linux is a good alternative for an operating system, but if you really dont like it then maybe try windows.




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

Search: