6 ms·
Oh, it's you again. We talked about this some time ago. Since then I stopped using Vim in favor of Emacs, which is modeless - I remember that having modes was t
by klibertp 13y ago
Oh, it's you again. We talked about this some time ago. Since then I stopped using Vim in favor of Emacs, which is modeless - I remember that having modes was the biggest sin of Vim in your eyes.
It's been 5 months since I switched to Emacs. My .emacs.d is actually bigger than .vim_runtime was, but it's because of more configurable features found in Emacs plugins, so it's natural. My init.el is also longer than my .vimrc, but this is because of much friendlier Emacs API and my love for Lisps (and dislike for vimscript). On the whole I'm quite pleased with the switch, although making Emacs into my editor took a comparable amount of time and code to Vim. I don't use Evil or anything like it, of course.
Emacs is better in many respects. CEDET is nice, SpeedBar and imenu with it's syntactic extensions work wonders - TagBar in Vim comes close to SpeedBar, but there's no imenu. auto-complete is better than omni-complete and easier to extend. Eshell works better than conque. Icicles, ido and smex make working with minibuffer a pleasure to the extent that Vim could never match - although it has basic completion of commands. Of course there is more, but the important thing to note here is that, while Emacs implements many things a bit better, Vim has them too. And it's perfectly reasonable to prefer Vim versions. So what I'm saying is that I found Emacs better but Vim is still really great.
Ok, so now to the modality. Emacs lacks modes, Vim has them. Last time we talked you were saying that modes are inefficient and hard to use. I could argue for modality then, but not against it, because I lacked experience with non-modal editor. Now I can compare the two.
The truth is that I was suspicious of non-modal editing in Emacs. I heard and read many rants about long sequences of modifier keys you need to press in order to do something. Turns out these rants where right for the most part. Some examples: C-- C-4 C-x <tab> performs hard dedent by four spaces. C-s C-w C-s ... performs incremental search (forward) for current word (Esc # in Vim). C-4 M-f goes four words forward (4w in Vim). There are also tricky ones, like C-x d opening dired and much easier to type C-x C-d displaying a list of files in current directory in a buffer.
In practice, however, with some amount of remapping, this is not an issue. But wait, isn't pressing escape instead of some universal prefix (C-c for user commands in emacs) not a problem in practice, too? After using Emacs and Vim I can say that the complexity of commands in both is almost the same. In Vim I remapped Esc to CapsLock - in Emacs I have Ctrl in place of CapsLock (although I'm contemplating placing Alt there and Ctrl in place of Alt). The only real difference I feel is that in Vim I could just hit the first modifier key (esc) while in Emacs I need to keep it pressed. Emacs uses Alt (Meta), while Vim does not, but that's a little difference, because Alt is usually in a place that's easy to reach.
In conclusion, while I like Emacs very much, I still find your claim that "modal editors" are for sad, handicapped individuals who just don't know any better full of bullshit. Modality is not any worse than modeless model in itself and Vim implements modality in a way which makes using it as convenient as Emacs chords. While there are other things I like in Emacs better, bashing Vim because of modes alone is pure stupidity; bashing it because of it's ancestry is an equivalent of saying that "your mama is fat" and saying it has no X feature is most likely false anyway.
PS. Elsewhere in this thread you're saying that Vim can't use mouse and clipboard. Of course it can - <esc>"=y copies to system clipboard instead of local one. I admit that Emacs support for mouse events is by far superior, and of course typesetting - colors, sizes and styles of fonts - are well supported in Emacs and not in Vim. But reaching for the mouse is bad anyway and if you have to, Vim supports all three mouse keys, which only makes the latter a valid claim. It's up to everyone to decide whether they truly need different fonts in their editor.
- mheathr 13y agoI also use Emacs (and Vim). While I respect the research done concerning modal UI and the associated consequences of that in the context of HCI, in practice I do not find that there is ever any confusion about what mode I am in when using Vim after using the editor for many hours, and if one was supremely concerned with avoiding such confusion UI changes per state could be implemented so that the changes were unavoidably obvious (such as by changing the entire background to a different color on a context switch). The design has some nice benefits elsewhere too with how Vim uses it. However, I do not find Emacs chording emphasis particularly demented either though, especially once the full array of modifiers are used. The amount of chords is only really burdensome due to how many domains Emacs covers though IMO, as it makes collisions with short chords much more frequent as the amount of keybinds necessarily expands. I find the criticisms of Vim usually extremely exaggerated and generally indicative of ignorance concerning its design, some of which you have correctly noted and addressed in your response. That is not to say that Vim is without its imperfections, but the design is well thought out, coherent, and well documented which makes the learning curve bearable. I find a mixture of chords and modes in Emacs quite nice using Evil-mode as I can choose to either avoid changing states or not, unlike in Vim. As I have noted elsewhere though, there is no intrinsic reason why Emacs must use chording over a modal design or some other means of using individual key sequences to invoke commands. It is merely a matter of redesigning how commands are invoked across Emacs, something which some people are working on and may be interesting in the future. I do wish there was something up to date that was similar to Practical Vim but for Emacs though as that was a very illuminating and fun text. Do you know of some documentation that elucidates CEDET more than the documentation on the site does? I have read that documentation a few times and have yet to grok what it really does and how one would use it in practice. It seems extremely powerful but I do not see how an end user takes advantage of it or how an extension writer would use it to compose an IDE for a new language.
- lutusp 13y ago> Elsewhere in this thread you're saying that Vim can't use mouse and clipboard. Of course it can - <esc>"=y copies to system clipboard instead of local one. 1. Thanks for correcting me. 2. Four characters. Very efficient. 3. All to avoid using any control keys. The reason? vi must be able to work with a keyboard that doesn't have any control keys, and vim must work exactly like vi. Not only do modern keyboards have control keys, but modern computers have mice and other pointing schemes. But vi/vim lives in a permanent time warp, a warp so profound that an old, justly retired editor I wrote in 1977 was far better at exploiting technological advances. Why was Apple Writer retired? Its limitations quickly became obvious, especially once early Apple computers supported mice (which happened before the Macintosh). No one wanted to keep using such a dinosaur in modern times, including me.