3 ms·
I basically agree with the final conclusion, but I don't think the example given--deleting five lines of text--actually supports it at all. The author is claimi
by samdk 13y ago
I basically agree with the final conclusion, but I don't think the example given--deleting five lines of text--actually supports it at all. The author is claiming that vim's way of doing it is cryptic (normal 5dd), and then says this about emacs' way:
Define a function for a ‘universal’ n-many operator
( Control-U ), pass that an iteration count integer,
have that perform the pre-defined global
kill-line-of-text operation ( Control-K ).
Vim's solution is conceptually the same: you're in normal mode because that's where you do text manipulation, prefixing commands with numbers is the standard way of repeating an action a fixed number of times, and dd is the pre-defined global delete-line-into-a-buffer operation.
They're both cryptic until you understand what's happening--the only real difference is that vim is less explicit, because this kind of action is exactly what vim is best at.
I suspect that there's a better example for demonstrating emacs' power, but I don't know emacs well enough to provide it. Vim is probably my favorite piece of software, but there are certainly things emacs does better.
- taeric 13y agoHmm... I think the difference is that the way a user would define how ctrl-k and ctrl-u work is identical to how the editor already implemented them. And that this is actually in a language you may use elsewhere. Whereas in vim, the implementation language is far removed from the customization language. (Well, maybe.) And yeah, I consider vim to be almost sacrosanct. Especially with the fugitive.vim plugin.
- deleted 13y ago[deleted]
- tikhonj 13y agoYeah, that example is not particularly good, especially since you can do C-# (where # is the number) in Emacs, which is qualitatively the same as vim. (It's just as magical.) I always use that instead of C-u because it's easier to type. Ultimately, the magic of Emacs is not in the key bindings; this is why Evil mode is not fundamentally against the Emacs philosophy. The magic is with how the editor feels just like an extension of the underlying elisp.
- Arelius 13y agoYou've just made my day with C-#