6 ms·
How about Emacs in eVIl mode?
by pradn 5y ago
How about Emacs in eVIl mode?
- Koshkin 5y agoThe worst of both worlds?
- drums8787 5y agoNah, it's the best. A recent thread on this convinced me to try Doom Emacs. It's great and just doubled my nerd factor.
- 1_player 5y agoEvil mode is better than VIM itself and a good editor for the Emacs operating system which previously lacked one.
- alpaca128 5y agoMany people constantly recommending Evil mode don't seem to get why some use Vim. No, Evil mode is not better than Vim itself. For one it's slower, defining keybindings is much more verbose, everything outside the actual text file has completely different controls, and I lose most of the seamless interoperability with other terminal tools. And it runs within an environment that tries to be literally every text-related tool by itself, making it overly complicated in many aspects.
- 1_player 5y ago> everything outside the actual text file has completely different controls Not sure what you mean by this > lose most of the seamless interoperability with other terminal tools It's not like VIM is more or less interoperable than Emacs is with other shell tools. They live in their own space, you don't (often) pipe stuff in or out of it. Though there's not much to read into my comment, it was an attempt of being witty, but evil mode is the best VIM implementation found in any editor and just for the fact that Elisp >> Vimscript, makes evil mode a better environment than VIM itself.
- apocolyps6 5y ago> They live in their own space, you don't (often) pipe stuff in or out of it. Well that's not true at least for vim. : read !FOO will run the FOO command and read the results back into the current buffer. I usually search my codebase by reading the results of a grep into a temporary buffer and 'gf'ing to the appropriate file
- rhabarba 5y agoThere isn’t much Vim can do which ed cannot, though.
- gnubison 5y agoExcept for some extra trivialities, like everything that isn't an ex command (and some that are).
- c2the3rd 5y agoC-u M-! does the exact same thing in Emacs.
- flukus 5y agoBut that goes back to the original point they made, everything outside of the actual text editing and you're in EMACS land with all of it's controls. Even with something as complete as spacemacs, the default landing page when you open it has different key bindings.
- soraminazuki 5y agoAs a Vim user who uses Emacs for note taking, I can guarantee Evil mode does far better at emulating Vim than you give credit for. In fact, the example you provided works just as well with Evil. The only built-in editing command which I notice missing from Vim is reliable undo/redo, which is sadly a fundamental Emacs limitation and a deal breaker. Apart from that, it's remarkably well-made.
- soraminazuki 5y ago> No, Evil mode is not better than Vim itself Emacs provides a convincing Vim layer on top of a hackable LISP runtime. While there's not much point in trying to decide which one is "better," it's not an entirely unfounded point. > For one it's slower Could you be more specific? At least for me, there's no noticeable lag when using Evil mode. > defining keybindings is much more verbose This is why some use Vim? I don't see how this: (define-key evil-normal-state-map (kbd "w") 'some-function) is any worse than this: nnoremap w :<C-u>call some-function()<CR> I for one could care less about how keybindings are set, as it's just something that I write once in a config file and forget about. > everything outside the actual text file has completely different controls It's because Emacs is more of a runtime for elisp applications. As such, it makes sense to have different behaviors for each key depending on context. FWIW evil-collection does a pretty good job of making keybindings feel consistent outside of ordinary text buffers, so you won't have to fall back to Emacs keybindings these days. > I lose most of the seamless interoperability with other terminal tools This is plainly false. Shell interoperability in evil works exactly the same as in Vim. > overly complicated in many aspects This doesn't mean much without specifics. Implementation complexity isn't inherently a bad thing as long as it provides value. Besides, Emacs is a just a LISP interpreter at its core. If anything, it's easy for programmers to grasp and hack on.
- jdiez17 5y ago> Could you be more specific? At least for me, there's no noticeable lag when using Evil mode. Long-time Vim user here. I tried switching to Doom Emacs for a few months. I really, really wanted to like it. As a nerd, the infinite customizability is like catnip to me. It has a really mature plugin ecosystem and you can have a really comfy computing setup with magit, org mode, dired, mu4e, etc... But Emacs is intrinsically slow as molasses. The nail in the coffin for me was the scrolling performance. And I don't mean line-by-line. Even going half a page, or a full page at a time, pegs a CPU core and there is noticeable latency. The Doom Emacs documentation straight up admits it [0]. They recommend crazy things like turning off line numbers. Even with newfangled native Elisp compiler, it doesn't come even close to vim on alacritty. [0] https://github.com/hlissner/doom-emacs/blob/develop/docs/faq.org#why-is-emacsdoom-slow https://github.com/hlissner/doom-emacs/blob/develop/docs/faq...
- tharne 5y agoThis needs to be brought up more. The "emacs + evil" crowd tends to see vim as a set of ergonomic keybindings, but it's so much more. It's the "seamless interoperability with other terminal tools" alongside the keybindings and text-editing grammar that makes vim so powerful.
- prussian 5y agonot sure about worse. enabling evil-ex-visual-char-range allows you to do things ex commands in (neo)vim cannot do. That is, run things like !rev on a visual select. in (neo)vim this reverses the whole line where with (evil-ex-visual-char-range t) enabled in evil does what I'd argue is expected, only reversing the string selected in visual mode.
- gnubison 5y agoOTOH, Neovim lets you edit the ex command line; e.g. '!}' might expand to ':.,.+5!', which lets you execute any other ex command simply by deleting the '!'. They both have advantages, and I'm certainly not advocating that forcing ex commands to work on lines is the best idea.
- samus 5y agoThat would be... an editor with Emacs keybindings, extendable with Vimscript?