Emacs and org-mode is frequently mentioned on HN as being awesome, but I don't feel like I could ever switch; I've got enough issues with vim already.
For one, all the keyboard shortcuts and commands that you have to learn; I don't know if I have the capacity to learn all that anymore, not without deliberate practice, while in modern editors you can get by with keyboard + mouse and slowly learn some new shortcuts here and there.
Second, it feels like you have to spend a lot of time to set it all up.
Third, will it replace an IDE? Error checking / linting, autocomplete, fast navigation, auto-imports, loads of things like that that seem to just work out-of-the-box in e.g. idea.
I feel like it’s pretty safe to say https://github.com/hlissner/doom-emacs mostly solves of these concerns for Vim users in 2020. If you really can’t spend any time learning a few help keys then I guess I can’t recommend anything, but you’re here commenting so I bet you have some time :).
Seriously, check out Doom, whether you use neovim, Emacs, VS Code, or nano (Doom has quite good Emacs and CUA bindings as well). It’s brilliant to the point where I’d describe it as Emacs with sane defaults. I guess it probably can’t match the more niche IDE features but LSP and friends are bridging most of the gaps.
You can finally safely ignore claims that beginners should roll their own emacs configs thanks to Doom. That strategy is good for learning if you’re used to diving into unfamiliar systems but you can learn just as much by starting with Doom and working your way inward anyway. The community is great, just like the larger emacs community.
I can’t stress Doom enough; it gets better often not by the day but by the hour. Henrik is a machine.
I use both doom emacs and neovim, and I'd say: not really, at least not for me, there are some Vim features evil doesn't emulate properly, or at least it doesn't work like in Vim. Off the top of my head, I write in many languages, but absolutely hate the US international keyboard for accented characters, guess what? Vim has built-in support for digraph[0] by using Ctrl-k and iirc this is a motion keyboard shortcut in emacs, and since I like and use org-mode a lot, I'm always frustrated when I have to type in another language. Another one was with the various Terminal emulators packages in emacs, although this one was solved recently[1], whereas in (neo)vim it works flawlessly ootb.
I have the same language issue. Emacs has a native version of this feature[0] that works great in Doom. TeX mode, where you enter a backslash before the accent (c \ , => ç) is most like C-k in that it requires an explicit keypress. I usually just use one of the language-specific modes because you can then fluidly type diacritics (with modes for prefix or postfix entry) and manually rewrite c, or e’ on the rare occasions such conflicts come up.
Thanks for pointing this out, seems the "bug" is exclusively with org-mode, which is too bad because I don't usually need this feature outside of org-mode.
I would say the Emacs user mindshare has shifted somewhat to Doom. There are a lot of Doom fans on r/emacs now, and the Discord is huge compared to what it was. Many new contributors are cropping up. Even some developers of well-known packages, like org-roam, have switched to Doom. Take it from him, not me! https://blog.jethro.dev/posts/migrating_to_doom_emacs/
Compared to Spacemacs, which has complex abstraction layers over Emacs, Doom seems to be much lighter. It's easy to get into Emacs browsing Doom's modules. Plus, the BDFL model is serving Doom quite well since Henrik is a god-tier BDFL. He's constantly active and keeps Doom very focused on performance with sensible defaults and consistent programming style. Docs are a focus and are growing, and they're extremely comfortable to browse in Doom Emacs itself, as well as the Doom and Emacs source code of course.
None of this is meant to attack Spacemacs, it did and does much for Emacs, and many swear by it. But I would say Doom is better these days.
Yeah, I was aware of that but the way I wrote it was ambiguous, sorry. I meant “even some people who have the chops to maintain complex custom configs are switching to Doom”.
For keybinds / setup time, I'd recommend either Spacemacs or Doom emacs. Spacemacs especially is meant to be quite newcomer friendly, with things like windows telling you "you pressed this key, here are the other keys you can press to complete the keybind sequence, and here's what they will do".
As for full fledged IDEs, no, I don't think Emacs can pretend to replace those, but you can still make the Emacs experience comfier. Linting is pretty good on Emacs with things like flycheck (& flyspell for spelling in say comments or commit changelogs).
For kernel C development I have a simple flycheck module that compiles the edited file and inlines all warnings / errors as lints. I also have another one for checkpatch (extra script you're meant to run before sending your commits to the mailing list); as a result I never have to look at any other window than the one where there is code in it.
For Python, pylint is supported out of the box by flycheck. Auto-completion is supposed to be feasible, but I had some issues with it and gave up - never felt like I really needed for what I do in Python anyway.
Fast navigation can be done with the usual cscope / gtags. More recently, I've been converted to using ripgrep for most searches (https://stegosaurusdormant.com/emacs-ripgrep/) as it is crazy fast. You can also directly edit the matches and commit the changes, which serves as a project-wide "search and replace".
If you didn't already know there's a command you can run to `find` files and put them in a dired buffer, then from there you can run an interactive regexp search/replace on all marked files. On mobile so I don't have the command names and key bindings available, but it's some combination of dired and find.
Pretend I have a crashing program and I want something better than the GDB repl and I don't want to import/create some project.
There's a lot of solutions for this but pretend I want to graphically step through, edit the code etc...
Emacs can do this quite well without any special hassle.
Just try using it as a debugger, when you're annoyed, search the web and you'll find your answer.
I'm not an emacs user so this is coming from a non koolaid drinker but I've been using it more and more for these special use cases
Maybe this is just as easy to do in, say, IntelliJ, I just feel like emacs will leave a cleaner footprint and have more sensible defaults.
So give emacs a try for debugging something (the Google-fu is GUD, grand unified debugger), it's not hard to use, the learning curve is pretty modest and you may be surprised by how sensible it is.
> For one, all the keyboard shortcuts and commands that you have to learn
> Second, it feels like you have to spend a lot of time to set it all up.
You learn a subset that's relevant to you. Also there is which-key which helps _a lot_.
But, I mean how do you learn, say, Spanish? Do you just drop English and start speaking Spanish to everyone from day one? No, it's something that happens in a dedicated time. Once you feel comfortable enough, and when the chance presents itself, you being integrating it to your daily life.
Similarly with Emacs, you could just start playing with it, maybe say editing your personal scripts with it at times, using Org mode for some notes. And then slowly integrate it to your life.
No matter how much work is done in the UI compartment, a tool as comprehensive and customisable as Emacs will never be learnt in one day. There won't be any magic bullets. It's always like learning a language.
The important consideration is if the returns are worth the investments here. Unlike other editors---which are great software in their own ways, anybody who says "hackers should use Emacs or Vim" or similar BS just don't know what they're saying---, Emacs provides some particular opportunities, which depending on your workflow might not be worth it.
> Third, will it replace an IDE?
Yes, you can get it to do all that. OOTB is hard, but AFAIU projects like Spacemacs and Doom are kinda making that happen.
I use emacs for org-mode exclusively. You only need to learn the buffer manipulation and org-mode keybinds for this, and the configuration.
I use vim for ad-hoc text editing, it's a poor IDE as I've configured it.
I use IntelliJ IDEA with IdeaVim for writing code.
I do not consider myself superhuman. A notable fact is that at some point previously, I've used every one of these as my main development editor.
I couldn't imagine having to maintain configuration for IDE-style features in all three editors, so I won't bother, but I do bother using the best tool for the job.
> you can get by with keyboard + mouse and slowly learn some new shortcuts here and there.
Agree, but I am extremely used to the trackpad and haven't used a mouse in years... because of its closeness to the keyboard (in pretty much any laptop) I can do things very quickly when I have no shortcut at hand... so much so that I only find it worthwhile to memorize a few shortcuts for the tools I use most (the terminal, IntelliJ IDEA, and a few for VS Code though I find their shortcuts terrible)... but it's unescapable that you'll need to use the mouse or trackpad sometimes, especially when not using your main tool (things like browsers, photo apps, even file managers unfortunately), so getting good at it I think is more useful than memorising a million shortcuts for a single tool.
They appeal to two different kinds of people. The first set (you and I) value the convenience of a job completed with a highly tuned and tested tool developed by word leaders in programming technology (Jetbrains). The other set of people wish to be able to tune things exactly as they wish, and focus on hyperoptimization of a set of known tasks that they become expert in.
Neither is wrong, but I do believe that when someone goes on about how if you just try hard enough to grok emacs, you will suddenly get it.
Maybe.
But I think there is an audience bias there, whereby only people who are inherently interested in tweaking and fiddling will achieve that benefit, and only people who wish to just get things done on a paid tool will be OK with using a mouse every so often. Horses for courses.
I think your comment is insightful there is a human inclination to simplify multidimensional situations into a single spectrum wherein we inevitably solidify our own preferences as the preferred end of the spectrum. Smart capable people like ME do foo whereas less clever people do bar.
I think you have properly pegged the determinant as desire for customization.
I think your intuition is about right: the IDE is going to squish all before it at the environments/runtimes it supports well, the vi(m) obsession with modal keyboard golf is a waste of time and org mode is a curious subcult of the the already weird (but, like, totally different from those vim heretics!) emacs cult.
The other things are worth exploring for fun and curiosity but it's sensible to look at them as they are - beautiful rainbows rather than maps to buried pots of hyper-productivity.
As a long-time evil-mode / emacs user, I would say your comment is pretty accurate.
Two objections come to mind at the moment::
* vim keybindings have helped my RSI significantly (and before you go there, I got RSI when I was an IDE user, before I focused on on Emacs)
* Using Emacs and building my own config has not made me massively more efficient at the workflow level, but it has taught me a great deal about software design and development than I would have otherwise learned.
Oh I'm just snarking at 'modal text editing is some programming superpower'. I've had RSI scares and similarly odd change-of-habit relief.
As to the second thing, it occurred to me recently that my .emacs is old enough to vote and probably still contains bits of other people's .emacsen that were old enough to vote when I first edited it.
Regarding RSI, I find vim keybinds critical for voice-based interaction with a computer. It really makes a large difference when it hears the wrong thing.
Org mode is the only reason I use Emacs. Nothing comes close to Org mode. Actually, I'd say that I use Org mode, and I use Emacs only incidentally because Org mode requires it.
Because I used Org mode, for awhile I tried to switch my other text editing to Emacs. But without a good mode, it's not worth using Emacs. I do all my other text editing in Vim.
In the past, I have used Emacs and then switched to Neovim. I just switched back to Emacs again. I am enjoying both - without any friction. To get the best out of both Emacs and (Neo)Vim, you have to treat them as different types of software.
> For one, all the keyboard shortcuts and commands that you have to learn
That's a valid concern. But if there was one keybinding every programmer should learn, it's probably Vim's. And while emacs has a default keybinding, it is not tied to it. Vim keybindings using evil-mode uses the same elisp interface as the default binding. Evil-mode feels very native and at par with Vim user experience. (Kakoune's bindings are derived from Vim's and is said to be better. But it's immature now. Hope it catches on.)
Emacs is a programming platform and not an editor as such. You should simply forget the key bindings (use what you are comfortable with- evil or even the Windows bindings) and focus on what the platform has to offer. Packages like Org-mode, Magit, restclient and a lot of others have no other alternatives. Emacs GUI also acts like a terminal emulator far more advanced than VT-100 emulators.
(Neo)vim is useful as an editor when you are setting up new systems or administering via SSH. Emacs is useful as a personal programming environment. With evil-mode, there will be no problem using either in the respective context.
> Second, it feels like you have to spend a lot of time to set it all up.
I support what everyone else recommends. Start with Doom Emacs or Spacemacs if you are a beginner. It does take a lot of time to set it up from scratch. I just prefer to set up everything from scratch, since I use a dotfiles repo. Improvements in configuration are incremental when you have a dotfiles repo.
> Third, will it replace an IDE?
All those are available. Just needs configuration. Or else, use Doom Emacs or Spacemacs - they come pre-configured. That really isn't the reason Emacs uses love it. It's those features you can't get in an IDE. If you have a task for which you need to switch out of an IDE, elisp makes it easy to integrate into emacs. The package repositories are full of such packages.
Others have given great recommendations for emacs options that lower the learning curve, but if you're interested in vim instead of emacs, onivim does the same with vim. https://onivim.github.io
Personal 4th reason: My mind keeps going back to this when I think I want to try Emacs again
> [Every dynamic module] should also export a symbol named plugin_is_GPL_compatible to indicate that its code is released under the GPL or compatible license; Emacs will signal an error if your program tries to load modules that don't export such a symbol.
The viral nature of the GPL already bothers me. Emacs trying to enforce that I'm only running GPL compatible code is even worse.
For one, all the keyboard shortcuts and commands that you have to learn; I don't know if I have the capacity to learn all that anymore, not without deliberate practice, while in modern editors you can get by with keyboard + mouse and slowly learn some new shortcuts here and there.
Second, it feels like you have to spend a lot of time to set it all up.
Third, will it replace an IDE? Error checking / linting, autocomplete, fast navigation, auto-imports, loads of things like that that seem to just work out-of-the-box in e.g. idea.