32

Pretty much every other editor that isn't a vi descendant (vim, cream, vi-emu) seems to use the emacs shortcuts (ctrl+w to delete back a word and so on)

Abhishek
  • 6,912
  • 14
  • 59
  • 85
dbr
  • 165,801
  • 69
  • 278
  • 343

14 Answers14

50

Early software was often modal, but usability took a turn at some point, away from this style.

VI-based editors are total enigmas -- they're the only real surviving members of that order of software.

Modes are a no-no in usability and interaction design because we humans are fickle mammals who cannot be trusted to remember what mode the application is in.

If you think you are in one "mode" when you are actually in another, then all sorts of badness can ensue. What you believe to be a series of harmless keystrokes can (in the wrong mode) cause unlimited catastrophe. This is known as a "mode error".

To learn more, search for the term "modeless" (and "usability")

As mentioned in the comments below, a Modal interface in the hands of an experienced and non-fickle person can be extremely efficient.

Leon Bambrick
  • 26,009
  • 9
  • 51
  • 75
  • 46
    While your answer does a good job of discussing the bad parts of modal interfaces for new users, it does not address the significant efficiency gains that a modal interface offers to experienced users. Perhaps you could edit your answer to address the benefits as well? – Hudson Dec 16 '08 at 20:47
  • 5
    +1 for "fickle mammals" -- makes UI design an interesting experience :) – bedwyr Apr 25 '10 at 22:49
  • 12
    Sometimes the most obvious interface for a beginner is not the best... Some really good things take a little investment! – AnthonyLambert Apr 30 '10 at 10:49
  • 9
    Sometimes the purported "productivity gains" from the "investment" are an excuse made after the fact to excuse the time wasted on the investment. I know and use vi/m. I know and use several other editors (but not EMACS). I've never seen a noticeable increase in productivity from any of them no matter how much time or effort I "invest" in them, largely because when I'm doing software right typing text is not my major activity. Thinking is. – JUST MY correct OPINION Jun 04 '10 at 04:46
  • 2
    For the record, my mail client (mutt), my web browser (uzbl) and my interactive shell (bash) all work in a modal mode. Modes can be dangerous if you forget what mode you're in, but very little cannot usually easily be recovered. Also, modal interaction, while counter-intuitive makes it easy to use very powerful commands. I am roughly Vim's age and I still see modal interaction as the only way of having real power on a keyboard. – rahmu Jan 31 '12 at 08:02
  • For the record, this is the first I've heard of uzbl. What this means, you decide. And mutt's "modes" aren't modes in the vi/m sense (the manual doesn't call them modes either), they're views. So, it gives a *VERY* clear indication which "mode" you're in. And lastly, which bash "modes" are you talking about? Bash supports vi editing, is that what you mean? If so, how many people who are no hard-core vi users use those keybindings? – Jürgen A. Erhard Sep 14 '16 at 14:24
  • @Hudson: didn't you mean "while your answer answers the question" and, thus, meant to not say anything at all? 27 upvotes... by vi fans? (This Emacs-user is ready for any old holy war ;-)) – Jürgen A. Erhard Sep 14 '16 at 14:26
  • Other than the addendum, this answer fails to address Vi’s popularity. Who cares about what usability experts say when they clearly don’t research the peculiar niche of modal editor (Vi, Emacs+Evil etc.) users? Hackers could have made Vi-like (although not clones) through the years. Why didn’t they (apparently)? Editors like Vis and Kakoune seem like a recent thing. – Guildenstern Feb 13 '19 at 19:21
  • 1
    @Guildenstern The question did not ask about it. – user4052054 Mar 11 '19 at 15:28
  • I feel like this answer came very close to touching on something that might be a really big factor: different problem domains have profoundly different mode error risks - the consequences of a mode error in something like `vim` are almost always reversible by hitting "undo" a lot; the consequences of mode error in a poorly designed image, video, or 3D model editor could easily freeze up the computer with heavy processing for minutes and blow through the entire space allotted in the undo history. – mtraceur Jun 30 '19 at 05:14
  • More relevantly to answering the question itself: I think this answer could be better by drawing attention to how there might be so few modal editors because `vim` basically fills that niche well enough: There are occasional alternative efforts, and lately `neovim` has come in to address the main pain points with `vim` in that niche, but `vim` was *flexible enough* that most modal editor wants and needs could be addressed by configuring and extending it. Also, to the question's premise: almost every editor that is flexible enough comes with a plug-in for more modal, `vi`-like UX. – mtraceur Jun 30 '19 at 05:24
  • @JUSTMYcorrectOPINION I agree. Modal editing isn't for productivity gains, but it sure is a _lot_ more fun and gets me psyched enough to start typing even on a bad coding day. Non-modal typing is just sad for me at this point, even though I am probably a little faster with non-modal. – SO_fix_the_vote_sorting_bug Jan 07 '21 at 19:27
8

Um... maybe there isn't much of a need for one, given that Vi/Vim is pretty much available everywhere and got the whole modal thing right? :)

Rytmis
  • 31,467
  • 8
  • 60
  • 69
  • 1
    Vis, Kakoune and Emacs+Evil seems to have proven this answer wrong. – Guildenstern Feb 13 '19 at 19:13
  • Arguably, things that mimic `vi` aren't really new modal editors, but Kakoune sure seems to count. :) – Rytmis Feb 14 '19 at 20:21
  • Vis doesn’t mimic Vi (it’s inspired by Vi and Sam). Emacs+Evil is Emacs plus Vim emulation, so not a Vi(m) editor any more than Spacevim is an Emacs (Spacemacs) editor. – Guildenstern Feb 14 '19 at 23:10
  • The part that you turned out to be wrong about was there being no need for new modal editors. – Guildenstern Feb 14 '19 at 23:11
  • Sure, yeah -- in fact, saying that there's "no need for anything new in this space" is a foolish thing regardless of the context. – Rytmis Feb 16 '19 at 14:47
  • But in a way this answer is on point - not because there is no need for anything new in this space, but because for a long time everything that already existed (`vim` and non-modal but sufficiently extendible editors like `emacs`) was *sufficiently flexible* that the new stuff was largely being built on top of it, causing low demand and selective pressures for making entirely new modal editors. – mtraceur Jun 30 '19 at 05:30
8

I think that it's because vi (and its ilk) already occupies the ecological niche of modal editors.

The number of people who prefer modal and haven't yet been attracted to vi is probably 0, so the hypothetical vi competitor would have to be so great as to make a significant number of vi users switch. This isn't likely. The cost of switching editors is huge and the vi-s are probably already as good as modal editors go. Well, maybe a significant breakthrough could improve upon them, but I find this unlikely.

Rafał Dowgird
  • 43,216
  • 11
  • 77
  • 90
  • Very true, especially since you can overwrite any part of the default keybindings you don't like in your .vimrc. – Xiong Chiamiov Apr 29 '10 at 22:37
  • I think a significant breakthrough will be inevitable in a world filled with multi-touch devices. The ability to display contextual hints directly on the keys lowers the learning curve of modal interfaces significantly. – Andrew Wagner Aug 22 '10 at 21:47
  • 1
    I totally agree with 1st sentence. This in essence answers the question. But with the rest I do not. I would like to use the modal editor, but hate EVERY major usability design decision in vim. Navigation in normal mode against visual mode? Keys binding? Extremely limited remapping options (for compatibility with abac?)? The strength of Vim is its plugin ecosystem, but vimscript.... – Slava Feb 13 '17 at 14:39
  • This just boils down to: Because Vi is already fantastic, switching is costly and it is “unlikely” (unsubstantiated but okay) that another modal editor could improve upon them. Or, in other words: “Vi is really great. That’s the best answer I can give.” – Guildenstern Feb 13 '19 at 19:17
  • The problem is that vi and _all_ variants I've ever tried are slow with any decent syntax/autocomplete enabled. This is the 21st century and they still haven't figured out how to output *text* at 60 fps? It's quite depressing. If we abstract the vi concept from its old, crufty engine, something like 4coder could be a replacement with vi key bindings. It runs fast, yet it could be identical to vi's particulars on the surface. – SO_fix_the_vote_sorting_bug Jan 07 '21 at 19:33
5

@Leon: Great answer.

@dbr: Modal editing is something that takes a while to get used to. If you were to build a new editor that fits this paradigm, how would you improve on VI/VIM/Emacs? I think that is, in part, an answer to the question. Getting it "right" is hard enough, competing agains the likes of VI/VIM/Emacs would be extremely tough -- most people who use these editors are "die hard" fans, and you'd have to give them a compelling reason to move to another editor. Those people who don't use them already are most likely going to stay in a non-modal editor. IMHO of course ;)

OJ.
  • 28,944
  • 5
  • 56
  • 71
  • The way to get new users would be to do one aimed at a particular niche, such as divascheme I mention in my answer. Make it simple. That said I'm very happy with vim. – Hamish Downer Dec 17 '08 at 18:50
  • “If you were to build a new editor that fits this paradigm, how would you improve on VI/VIM/Emacs?”—Kakoune, for one. Was the original Vi really such a stroke of genius? Billy Joy didn’t seem to think so. – Guildenstern Feb 13 '19 at 19:25
5

Modal editors have the huge advantage to touch typists that you can navigate around the screen without taking your hands off the home row. My wrists only hurt when I'm doing stuff that requires me to move my hand off the keyboard and onto the mouse or arrow keys and back constantly.

Paul Tomblin
  • 179,021
  • 58
  • 319
  • 408
4

Remember that Notepad is a modal editor!

To see this, try typing E, D, I, T; now try typing Alt, E, D, I, T. In the second case the Alt key activates the "menu mode" so the results are different. :oP People seem to cope with that.

(Yes, this is a feature of Windows rather than specifically of Notepad. I think it's a bad feature because it is easy to hit Alt by mistake and I don't think you can turn it off.)

Ben C
  • 658
  • 6
  • 18
  • Interesting, ["Quasimodes"](http://en.wikipedia.org/wiki/Mode_%28computer_interface%29#Quasimodes) (which points out Windows has a StickyKeys mode which turns that into a proper modal system!) – dbr Jul 04 '14 at 13:52
  • 1
    You can similarly argue that every editor that can do selection is modal. Moreover I'd say that selecting something (maybe by some key shortcut from insert mode) is the best way to switch to selection mode. – Slava Feb 13 '17 at 14:48
  • @Slava Yes! If you highlight a block then typing text, Ctrl-C (copy), Delete and arrow keys all have changed behaviours. (An editor can in fact provide the same functionality non-modally, although probably less useably and intuitively than via highlighted blocks. In vi you can set a mark (`ma`), then move to another position and delete (`d\`a`), change (`c\`a`) or copy (`y\`a`) the text between that position and the mark.) – Ben C Feb 14 '17 at 09:03
  • 2
    +1 To emphasize this more: something "non-modal" like `emacs` suddenly feels extremely modal when you have sticky and latching modifier keys: `Ctrl` `Ctrl` (mode switch) `x` `c` (command). And when I use `zsh`, I either use the built-in `vi` command mode extensively (when using in through a normal computer keyboard) or stay almost entirely in insert mode, with all the modal benefits from sticky latching modifiers (when using it through a phone with a well-configured keyboard). There is a symmetry, even a functional equivalence at times, between these modal and ostensibly non-modal interfaces. – mtraceur Jun 30 '19 at 05:37
3

VIM and emacs make about as much user interface design sense as qwerty. We now have available modern computer optimized key layouts (see the colemak layout and the carpalx project); it's only a matter of time before someone does the same for text editors.

Andrew Wagner
  • 22,677
  • 21
  • 86
  • 100
  • To clarify, I love vim's command set. The power of the commands alone results in a huge reduction in the number of button presses, but I feel like the key layout was driven more by mnemonics and backwards compatibility than by ergonomics. Perhaps this is just information theory at work though; the more efficient the commands get, the more randomly located they are. – Andrew Wagner Oct 01 '10 at 14:30
2

I believe Eclipse has Vi bindings and there is a Visual Studio plugin/extension, too (which is called Vi-Emu, or something).

Peter Stuifzand
  • 5,084
  • 1
  • 23
  • 28
2

It's worth noting that the vi input models survival is in part due it's adoption in the POSIX standard, so investing time in learning would mean your guarenteed to be able to work on any system complying to these standards. So, like English, theres power in ubiquity.

As far as alternatives go, I doubt an alternate model editor would survive a 30 day free trial period, so its the same reason more people drive automatics than fly jets.

2

Since this is a question already at odds with the "no subjective issues" mantra, allow me to face that head on in kind.

Non-Modal editing seeks to solve the problem caused by non-modal editing in the first place.

Simply put, with Modal editing I can do nearly everything without my hands leaving the keyboard, and without even tormenting my pinky with reaching for the control, or interrupting my finger placement by hunting for the arrow keys.

  1. Reaching for mouse completely interrupts the train of thought. I have hated the intense reliance upon this with Intellij IDEA and Netbeans for many years. Even with vim-style addons.

  2. Most of what you do has to do with fine-tuning with very small increments and changes within the same paragraph of code. Move up, move over, change character, etc., etc. These things are interrupted with control keys and arrows and mouse.

alife
  • 411
  • 4
  • 14
  • While I don't have an issue with the subjectivity of the answer, it is still not a response to the OP's question. – cigien May 01 '20 at 00:31
1

Though not really answering your question, there used to be a "modal like" way to write Japanese on cell phones before : The first letter you hit was a conson let's say K, and then, and then the next key you would hit would have the role of a conson. (Having two conson in a row is impossible in Japanese)

Though it was main a few years ago, today it's only used by people who really want to hit fast.

fulmicoton
  • 15,502
  • 9
  • 54
  • 74
1

The invention of the mouse took one mode and moved it to an input device, and context menus took another mode and moved it to a button. Ironically, the advent of touch devices has had the reverse effect, producing multi-modal interfaces:

  • aware multi-modal - touch and speech are aware of each other and intersect

  • unaware multi-modal - touch and speech are unaware of each other and conflict

The traditional WIMP interfaces have the basic premise that the information can flow in and out of the system through a single channel or an event stream. This event stream can be in the form of input (mouse, keyboard etc) where the user enters data to the system and expects feedback in the form of output (voice, vibration, visual, etc) when the system responds. But the channel maintains its singularity and can process information one source at a time. For example, in today’s interaction, the computer ignores typed information (through a keyboard) when a mouse button is depressed.

This is very much different from a multimodal interaction where the system has multiple event streams and channels and can process information coming through various input modes acting in parallel, such as those described above. For example, in an IVR system a user can either type or speak to navigate through the menu.

References

Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
1

I think the answer to the question is actually there are quite a few modal text editors that aren't forks of vi/vim. However they all use the vi key bindings. Vi users get the key bindings into their muscle memory so relearning a different set of key bindings would be really hard, so no-one would create a different set of key bindings.

But lots of different editors have re-implemented the vi key bindings from scratch. Just look at this question about IDEs with vi key bindings. At least half of the answers are editors built from scratch that implement vi key bindings, not versions of vi embedded.

Community
  • 1
  • 1
Hamish Downer
  • 16,603
  • 16
  • 90
  • 84
  • 1
    Mmhmm. You'll notice that even things that aren't editors sometimes have vi-like keybindings (Gmail and Google Reader come to mind). – Xiong Chiamiov Apr 29 '10 at 22:36
  • 1
    [Kakoune](http://kakoune.org/why-kakoune/why-kakoune.html) doesn't use vi key bindings – phuclv May 27 '17 at 14:17
  • 1
    Imagine programmers as instrumentalists. “Nuh-huh, I can’t play piano I have already trained my muscles to play the guitar!” – Guildenstern Feb 13 '19 at 19:28
1

I recently came across divascheme - an alternative set of key bindings for DrScheme. This is modal, and part of the justification is to do with RSI - specifically avoiding lots of wrist twisting to hit Ctrl-Alt-Shift-something. The coder has done an informal survey of fellow coders and found that emacs users suffered from more wrist pain than vi coders.

You can see him doing a short talk at LugRadio Live USA. (The video is a series of 5 minute talks and I can't remember how far through it is, sorry - if someone watches it and posts that here I'll edit this post to say when in the video it is).

Note I have not used divascheme.

Valery Viktorovsky
  • 6,487
  • 3
  • 39
  • 47
Hamish Downer
  • 16,603
  • 16
  • 90
  • 84