💾 Archived View for midnight.pub › replies › 4786 captured on 2023-12-28 at 17:53:00. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-07-16)
-=-=-=-=-=-=-
No offence to anyone, so please take my question as genuine curiosity. How do you deal with those keybinds on emacs? Like i have tried multiple times to switch to it but it just doesn’t have the simplicity of vim. I really want to learn it but I always get stuck on the idea of time invested vs returns. Could someone enlighten me on this?
and ~bartender, a glass of water please.
How do you deal with those keybinds on emacs?
I've no idea, my muscles do it on their own :-). There is some logic to some of the mappings but realistically not to the level of composability vi has.
I think this whole editor efficiency thing is overrated. I learned emacs pretty much by accident, it could've easily been vi. Tbh I think that once you've learned an editor, the only reason you should learn another editor is if the one you're already using is suddenly wiped out of existence, or it doesn't run on the platform you're using, or some similar catastrophe that makes the editor you used unavailable. In my case, if UltraEdit had been available for FreeBSD back when I learned emacs, there's a good chance I would've never learned emacs.
Not that I don't enjoy mock editor wars, those are fun as long as in they're good humour :-D.
The default keybinds are okay, but I've got used to them over the last 30 years. The basic movement commands are control + mnemonic. Global commands are on C-x something, major mode commands are on C-c something, if you have a reasonable completion framework installed, you can treat M-x like a command palette with fuzzy matching. Which-key-mode gives you hints for every prefix binding.
It's not totally unreasonable to use CUA-mode if you're used to those, or Evil if you're used to vim.
Hello ~orchard,
I'm a long time emacs user (since 1993), and I use vi almost daily, too. "vi" that is, not "vim". I cannot agree, that vi key bindings are "simpler". They are different. And I think, this is important: vi and emacs come from different points of view of the computing world back then, when they were created. To compare one to the other is difficult.
A resource that I find helpful is "Mastering Emacs" by Mickey Peterson
https://www.masteringemacs.org/
I never groked emacs-lisp, but I do use selectrum,consult and friends for completion, magit to talk to git, tramp to connect to remote machines, org-mode, org-roam, mu4e, elpher, and a few language modes. Since recently I also use the modus themes plus jetbrains mono fonts. My init.el uses 38 packages as I type this. So I consider myself a moderate user of elisp packages.
Yes it takes time to master such a tool. But I never had to learn another editor after emacs. Entering text in a web form (like now) is not really comfortable, imho. If you really want to explore emacs, then start using it for a small set of tasks. Do not try to set up /everything/ at day one.
~bartender? Another lemonade, please.
That's the thing about emacs, it's a very mediocre text editor that comes with a great operating system :p
99% of emacs is knowing your way around elisp, which is just a generic dynamically typed lisp that happens to be very good at plain text processing. It doesn't have good default keybinds because 1) when those keybinds where first chosen keyboards were very different from today (search "space cadet keyboard") and 2) you are not supposed to use the defaults at all, the whole point is that you write your own text editor with the facilities emacs provides you.
You might be thinking: elisp isn't a great language, and if you're going to be writing everything from scratch, you could just as well be writing the entire text editor from scratch with a better language right? Well yes- but then you're going to be missing out on all the things that other people have written. Countless packages on elpa and melpa that do anything and everything you could possibly imagine: magit, lsp-mode, smartparens, yasnippet, and the list goes ever on and on.
You might also be thinking: this all sounds absurdly time-consuming. Why would I go through all this trouble when I could just be using a text editor with sane defaults someone else has written? Well the hard truth is that you will have to invest a lot of time into emacs if you're really willing to use it. Make no mistake, there are a few emacs distributions that come preconfigured with lots of great packages (like spacemacs, doom, frontmacs and a few others) and some people might argue that using them misses the point of emacs entirely.
In summary, use whatever you prefer and best fits your needs. If you're not a fan of having to load 20 megabytes from disk every time you boot up your editor and would rather use vim, then so be it (albeit kakoune is better than vim! ;)
evil-mode all the things + general.el for defining custom bindings. I am a long-time vim user, but do use emacs for things like org-mode. I prefer modal editing and vi-style navigation to emacs' defaults, which feel especially cumbersome if typing on a phone in termux for example. However, I don't attempt to completely vimify emacs and remap all the bindings. I tend to use the defaults of each mode and only remap when stuff is overridden by evil.
That said, like anything, delving into emacs takes time. Whether or not it is worth the effort depends on your needs really. For me, it has been worth it to make use of versatile tooling such as org-mode.