reddit / emacs

I want to give up Vim

karshtharyani · 2022-02-19 14:43
I have come to the conclusion that despite its excellent keystroke and plug-in customizations, vim still requires a lot of work to get simple development tools working inside of it. Anyway, are there any good starting resources to help me learn more about emacs and also smoothen my transition? What have I tried so far? - emacs tutorial - have looked at evil, but haven’t tried it. Is it good? Any other help is welcome. Also, you can delete this if it is a repost. Thanks!
Auslegung · 2022-02-19 14:50
Check out Doom Emacs. I used vim/nvim for a year or two and loved it but had a few gripes. I switched to Doom and was just as productive within a couple of days, I was absolutely shocked. Doom has evil on by default and evil works great
prite · 2022-02-19 15:04
Another vimmer here. Started using Emacs about six years ago. Always with evil-mode. It's the best Vim-emulation implementation I have ever seen. There were some differences here and there, at the beginning, but nearly none that were a bother. I remember reading somewhere that evil-mode devs consider a deviation from vim as a bug. In support of this, I can attest that none of the differences from back then persist, AFAICT. You'll definitely want more than just the evil-mode package, though. Prime example: evil-collection. I suggest starting with Doom Emacs which has excellent integration of evil, among many other niceties, into Emacs. PS: I still haven't given up on *Vim though; I use it when I can't use Emacs.
LocalExistence · 2022-02-19 15:07
It might be better to ask about concrete development tools - what languages do you usually work with, and what kind of tooling are you looking for? In my experience, it's a bit of a crapshoot what's easy and what takes a little more work. E.g. magit took me no work at all, while virtualenv management in Python was a little awkward and still is a little wonky. If you just want general pointers for getting started with emacs, IMO do the tutorial and just start using it, but if you do C++ development most of the time, it'd probably be worth it to ask more specifically about a setup to get started with that.
BobKoss · 2022-02-19 15:12
Doom Emacs is what you want. Plenty of YouTube videos to get you started.
ForeverFortunate · 2022-02-19 15:29
I used vim for 10ish years, then tried spacemacs, stuck with it for about a year or two, but switched to doom emacs two years ago because it was more polished and optimized, and haven't looked back since. The space-key leader bindings + which-key combination for discoverability, has shown unbeatable so far.
ourobo-ros · 2022-02-19 15:31
off-topic question, but is there anything you miss about spacemacs? I ask because I use doom, but have always wanted to give spacemacs a try and wondering if it is worth the hassle. Many thanks!
colemaker360 · 2022-02-19 15:46
I second the recommendations for Doom, and I like to think of Vim as a lite fallback editor for small stuff, kinda like how people use notepad on Windows.
karshtharyani · 2022-02-19 15:53
That’s an excellent point. My development is mostly in C++. The typical workflow involves: - writing new code - modifying existing codebase - running tests and debugging Thus, anything that helps with code completion, and debugging (preferably visual) is great. The build system is mostly Make based so I don’t mind using the command line for that.
karshtharyani · 2022-02-19 15:54
Much appreciated! That seems to be the common opinion here.
ftrx · 2022-02-19 16:08
Ex "hard-core" vimmer here, ~4th year in Emacs: Emacs do require as much time as Vim, even more IME, to reach an equally "comfy state, 'now I'm really at home' level" but as Unix/Vim pay back countless of time more. So the first resource is not what you ask for but... Take time: Vim is the companion of the Unix operating environment (shell, userland), Emacs is *the operating environment* at a whole, potentially it can be your WM (EXWM, can't use other WM/DE/DSs anymore), your "shell" (2D 'GUI' instead of 1D CLI) etc. Having that in mind is IMVHO the way to approach the rest. Now, about the resources you ask: in books terms the sole I really recommend is Mastering Emacs by Mickey Petersen, unfortunately it's ebook only AFAIK, but worth the screen reading. In other valuable resources even if less quick to pass than a book: - Mike Zamansky's video series :: https://cestlaz.github.io/stories/emacs/ or direct via https://www.youtube.com/playlist?list=PL9KxKa8NpFxIcNQa9js7dQQIHc81b0-Xg - Rainer König tutorials :: https://www.youtube.com/playlist?list=PLVtKhBrRV_ZkPnBtt_TD1Cs9PJlU0IIdE they are a bit old, but still valid when you are in learning mode, he also offer an Udemy course if I remember correctly - Protesilaos Stavrou videos :: less introductory in general but worth every seconds https://www.youtube.com/playlist?list=PL8Bwba5vnQK14z96Gil86pLMDO2GnOhQ6 - System Crafters, David Wilson videos :: https://www.youtube.com/c/SystemCrafters/playlists the newer are a bit too discursive but very nice indeed - Emacs-Elements :: https://www.youtube.com/channel/UCe5excZqMeG1CIW-YhMTCEQ/videos unstructured, topic-specific but nice to learn things you find interesting, short enough - Tony Aldon :: https://www.youtube.com/channel/UCQCrbWOFRmFYqoeou0Qv3Kg/videos even shorter, speechless but informative/topic-specific More on the showcase, but useful to see what you can get from Emacs and new potential way to use it: - https://youtu.be/B6jfrrwR10k one of the most classic Howard Abrams showcases, see also https://youtu.be/dljNabciEGg - https://youtu.be/lCc3UoQku-E very simple for pdf-tools/org-noter nothing special, but if you take notes on pdfs... - https://youtu.be/5ViUBaarsbw a bit exaggerated but interesting for the approach Long story short: Emacs was born in a lab where people see each other and interact in person, it have an excellent in-line help system, but it's mostly useful only if you already know and look for something, much like and far better than `man` on Unix, the formal "documentation" part is really raw, too generic or too specific etc IME/IMO, video tutorials can be a sort of "not-really-in-person but similar experience" that might sound time consuming at first, but in the end they help progressing far more quickly since you do see the outcome BEFORE actually learning so you know up front if it's worth learning or not. Mastering Emacs and countless of blog posts, SE Q&A etc complete the game. It's not a well defined learning path but for me works well enough, in few month Emacs became my most used app behind only zsh and Firefox and in few months more my WM, mail client, file manager, ... annihilating in the process 15+ years old super-curated home taxonomy and unix setup to a point that even my zsh is now an org-mode file org-roam managed that just tangle a far smaller than ever config :-)
[deleted] · 2022-02-19 16:17
You could try neovim too the lsp is easy to set up
ProfessorSexyTime · 2022-02-19 16:18
[ccls](https://github.com/MaskRay/ccls) with [lsp-mode](https://github.com/emacs-lsp/emacs-ccls) and [dap-mode](https://emacs-lsp.github.io/dap-mode/page/configuration/#native-debug-gdblldb) and is what will fill most of those needs. Unfortunately testing is one thing in Emacs that isn't covered across many languages with a package like lsp-mode. (Yet, at least. 🤞)
pwnedary · 2022-02-19 16:30
> I have come to the conclusion that despite its excellent keystroke and plug-in customizations, vim still requires a lot of work to get simple development tools working inside of it. IMO, Emacs is in no way better in this regard, and I wonder why you would think it would be the case. The Vim mindshare is simply many times larger and Emacs customizations are often a bit more bespoke.
llambda_of_the_alps · 2022-02-19 16:37
I would second this. NeoVim is much better for integrating outside tools than Vim. Especially when you have something like null-ls which is a layer between the lsp interface and tools which don’t support it. That said I bounce back and forth between Doom and NeoVim these days. I would definitely suggest Doom for migrating from Vim to Emacs. It’s very opinionated and very customized but less of a departure from the ‘normal’ way to configure Emacs than say SpaceMacs with its layers and such.
PreferredBadger672 · 2022-02-19 16:47
https://tuhdo.github.io/c-ide.html
ForeverFortunate · 2022-02-19 16:52
Well one thing i can think of is that i feel the people behind spacemacs are slightly less opinionated about what is the best choice for you, and will often give you a choice rather than attempting to support both options. A concrete example of this is how in doom emacs, ripgrep is actually a hard dependency, and (at least last time i tried to) the project search cannot be changed to always use silversearcher-ag, whose search options i find easier to use. The flip side of this however, is that the options the doom emacs choose to actually deliver on have proved to be more polished and less buggy, which I find is the main reason I actually stuck with doom emacs. I initially got wowed into spacemacs because it had so many features out-of-the box that "just worked", but with doom emacs I get the same experience, only that it "just works, without constant glitches". But other than this, I don't really miss anything, neither one really has more features than the other, but it was slightly annoying to have to relearn some muscle memory. Just my two cents.
Rotatop · 2022-02-19 17:28
From what you said : don't go into emacs. Same as vim. Prefere visual code
wsppan · 2022-02-19 18:44
>I have come to the conclusion that despite its excellent keystroke and plug-in customizations, vim still requires a lot of work to get simple development tools working inside of it. Oh, you are going to love Emacs then, lol!
7890yuiop · 2022-02-19 19:55
> vim still requires a lot of work to get simple development tools working inside of it. You'll probably come to the same conclusion about Emacs then.
[deleted] · 2022-02-19 20:39
Doom emacs is nice but I feel like i don't need 70% of what's packaged there and i can get a similar config while a lot simpler on neovim.
llambda_of_the_alps · 2022-02-19 20:45
Oh yeah, Doom is big. Don’t get me wrong I love NeoVim. Like I said I actually bounce back and forth a bit. My point was more if someone is wanting to move from Vim to Emacs then Doom is the way to go. What I really need is for NeoVim’s org-mode implementation to be up to snuff.
LocalExistence · 2022-02-19 21:44
I haven't done much C++ development, but have tried eglot (similar to lsp-mode) and found it to work okay, at least for a novice like myself, so I'd second the suggestions you got in the comment. I'd also suggest looking at Doom Emacs in case you struggle getting it running - AFAIK that comes with a LSP setup for C++, so probably you could just copy that (or use Doom Emacs itself of course). As far as testing goes, one quick 'n dirty solution I have used before is to just make a macro which compiles my code and runs the test suite, and bind it to a convenient shortcut. That way it's pretty fast to run tests once you change something. You can also do this using compilation-mode, probably, but there's probably a better ways of doing it too. Good luck!
rhabarba · 2022-02-19 22:22
I moved from Vim over Sublime Text to (usually, GNU) Emacs a few years ago. Using Vim emulation modes would have made it harder *for me*. It's better to embrace Emacs right from the beginning.
rhabarba · 2022-02-19 22:23
For a fallback editor, Vim is probably too large though. `nvi` (or `joe`) would be more than enough IMO.
Suskeyhose · 2022-02-19 23:22
Use doom emacs. It's quite customizable, but it comes with a module system that allows you to just 'turn on' many different features, language support, etc. It's alsp very fast compared to most non-handrolled emacs configs, and it centers around evil, which is fantastic and will fedl very familiar. Also if you use git, you should check out magit, which puts basically every other git client to shame, and org mode, which is everything you could want out of a word processor and productivity system and more.
robopiglet · 2022-02-20 01:00
I use vim and emacs together, essentially. I have a vim mode for emacs. I would never, ever use emac's comical bindings to perform simple movements, edits, and a couple other things. The best of both worlds.
Balghur · 2022-02-20 01:18
David did mention on this friday stream he found odd that the guy behind Emacs Elements just stopped posting new videos, and now the channel is gone... ​ I hope everything is ok with him, it was a great resource for someone like me.
colemaker360 · 2022-02-20 02:32
Sure, but when using Doom and Evil primarily, you get used to modal editing so that’s really what I mean - you have a little brother editor to fall back to with vim. Nano and joe aren’t going to give you that same experience.
TheRedPepper · 2022-02-20 03:06
I literally have this setup but with neovim
rhabarba · 2022-02-20 03:08
[`nvi`](https://en.wikipedia.org/wiki/Nvi) is not Nano. :-)
fedekun · 2022-02-20 06:29
In my experience, Emacs users love doing _everything_ in Emacs, and while there are some Vim users like that, I personally use Vim as just an editor. I'll alt-tab into a terminal to do stuff, I don't want to read email in Vim, or use git from Vim (I do have some integrations though, like git gutter and some commands for git blame, etc). So if you are like me, Emacs might not be for you. If you do like to have everything and the kitchen sink in your editor, then I think Emacs > Vim.
ellipticcode0 · 2022-02-20 06:46
Vim is much faster when editing code, Emacs is 10x more mature for packages or packages management. You should not give up Vim, just use both, Evil mode can only simplify key movements, Evil mode can not load your Vim script, evil does not support regex like Vim, (plz do not ask me what regex engine Vim use, I do not know) You can NOT modify your Toyota to be like a Ferrari
ideasman_42 · 2022-02-20 07:57
Suggest https://github.com/ideasman42/emacs-for-vimmers to get you up and running with something approximating a typical development configuration in VIM. Even is close enough to VIM to be fine for every-day use, once in a blue moon I run into some limitation, but generally it's fine.
Martinsos · 2022-02-20 08:05
You should try one of Emacs "distributions", that come with a lot of stuff already preconfigured following best practices, if you want that experience of "just works" but still have the customisability of Emacs available. Most popular are Spacemacs and Doom Emacs . I personally use Spacemacs with evil(vim) keybindings, and I had to configure very little of it myself. Never tried Doom but a lot of people love it.
ftrx · 2022-02-20 15:09
Oh, thanks those links are out of my notes, I miss the change. More than a health issue (witch I think do not led to a channel deletion) I suppose might be something related to YT copyright scanning for music or ban for VPN usage, anyway I too hope he'll be back :-)
EndlessApoptosis · 2022-02-20 18:59
Yes and no IMHO. Mashing C-n and C-p to navigate the buffer is tiring and can be hard if you use your pinkie. The thing is, when you learn about parinfer, paredit, lispy, avy, consult and friends, you start to actually dislike mashing buttons to reached the section of text that you want. Instead you start to embrace visual or global search and never look back. I used doom emacs extensively for all my computing needs. Recently I tried to roll my own config using guix as the package manager for emacs. At first it was jarring to say the least, but now is very comfortable and i'm having trouble remembering to switch into insert mode when I edit on doom emacs.
vaxdar · 2022-02-22 01:29
I switched from vim to emacs around 4 years ago, and can't imagine going back. I agree with others though, that if anything, emacs can take more work, not less. The thing is, it's a different, better kind of work, I think. In vim, you're fighting with a mix of external tools and vimscript and bits of inscrutable configuration, where in emacs you're using an actual language, customizing a platform, and learning how to mold the environment to yourself. I'm always hesitant to recommend emacs, because it's a whole hobby on its own, and you just have to be ok with that. Also, agreed with others, just use Doom, especially to start. I didn't, but I'm a weirdo with weird keyboard/keybinding preferences that none of the prebuilt configs supported easily. I still had most of what I cared about from vim working in emacs within a couple days of dedicated trying though.
karshtharyani · 2022-04-12 02:25
Thanks a bunch, everyone, for all your feedback! I think the major issue wasn't so much about the editor, but in general, the lack of settings to support easy and fluid C++ development. I found everything I was looking for, and more, with CLion! Call me a deserter, but I feel this is IDE is so feature rich, I see no reason for me to use vim or emacs! :) And it allows me to use my vim keybindings (sweet!) Again, this is just my opinion, and I shall be happy to share my findings with you. CLion is paid, but I think this video should be enough (maybe?) to convince a seasoned C++ developer to nod in agreement on why a good IDE matters and makes life simpler. And consider giving it a shot, I think you will be convinced. [https://www.youtube.com/watch?v=Srnw1dI1iAA](https://www.youtube.com/watch?v=Srnw1dI1iAA) Till then!