3 ms·
I am using Vim. Is it worth it to try emacs?
by turing_complete 6y ago
I am using Vim. Is it worth it to try emacs?
- quanticle 6y agoIf you're happy with vim, stick with it. In general, when it comes to editors, you're better off trying to get really good at the editors you already know than being mediocre at using a bunch of different editors.
- mkesper 6y agoTry doom-emacs, consequently evil-mode and highly adaptable. https://github.com/hlissner/doom-emacs https://github.com/hlissner/doom-emacs
- alkyon 6y agoI used to use Vim, but switched to Spacemacs and never looked back. I highly recommend it as it gives you Vim bindings with all Emacs possibilities.
- fennecfoxen 6y agoHere's what I do in emacs that makes me like it better than vim. If you want to do things like this, you should consider Emacs. If not, you are likely better served by Vim. - I write software with unit tests. I have a custom method bound to Shift-F5 that computes the test file associated with the current code file, and switches to the buffer. - I have a similar method bound to F5 that runs the tests for the current file (code file or test file). Ctrl-F5 to run the previous test again even if you're in a different buffer. - These are configured for multiple programming languages, testrunners, and different conventions within specific programming languages, in different parts of the codebase. - Test output goes to a first-class buffer, like any other file I'm working on. If I want to do something like `git blame` the file I'm working in, it's also a first-class buffer. Want to run a shell? `tail -f` some logs? All in first-class buffers. - Why does it matter that things end up in first class buffers? Well, there's lots of random goodies like `meta-x json-pretty-print-region`, so if your execution dumps a blob of unformatted JSON or whatever, you can manipulate it readily. (Tab complete is available on these commands.) - Autoformat your code automatically with a save hook. Autoformat it on your own schedule by calling something like `m-x blacken-buffer`. I don't think vi does as good a job of manipulating the contents of your file with internal and external programs. - undo-tree-visualize.
- demosito666 6y agoVim can do all of the above pretty easily. In fact, I have a mapping for json pretty-printing, filtering it with jq; mapping for autoformatting with black or other formatter depending on file type; a plug-in for undo history tree. I don't have configuration for running tests the way you do, but I know a guy who does something very similar in vim. I don't think the things you describe are the differentiators for the Great Editors. For me it's more their phylosophies that make them stand apart: despite the wide usage, vimscript is far more clunky, narrow-scoped and less powerful than elisp. Which means that stitching together something complex is hard and awkward in vim. Emacs is far more suited for complex processing due it's nature of a lisp machine. The chords are awkward though. So, "emacs is a good OS, but it lacks a good text editor".
- fennecfoxen 6y ago> I don't have configuration for running tests the way you do, but I know a guy who does something very similar in vim. I would love to see that: everyone I know who uses Vim ends up typing out test names in a separate terminal, or running some sort of a shell-out command that suspends editing of the current file until it is complete, and then hides its output.