r/programming • • May 23 '17

Stack Overflow: Helping One Million Developers Exit Vim

https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
9.2k Upvotes

1.1k comments sorted by

View all comments

Show parent comment

4

u/Elathrain May 23 '17

Again, it comes back to use of the software. If you want an editor that lets you type text, use Notepad. It's great at that. But you'll notice nobody says Notepad is the shining example of the best text editor ever, because that's all it does.

VIM is explicitly an editor for people who need to do more with it. It was designed at a time where "casual user" was not a concept that existed. It was assumed that if you were using VIM, you were technically competent and probably a programmer, because otherwise what the hell are you doing on a computer. It was also an era where you were expected to have, and read, the manual for your software. This wasn't a gaff on the design team's part, everything was done that way.

A fundamental principle of VIM is that pressing buttons does things, and it accepts button presses in groups. If you hit d it begins a delete operation, and waits for further input, specifically a number followed by a designator character (defaulting to 1 with no number). w for word, c for character, and the command character again (d in this case) for line. So you can quickly dd delete line, d3d delete three lines, d2w delete two words, d15c delete fifteen characters, etc.

This lets you do things that a modern text editor doesn't, quickly and efficiently.

What casual or new users tend to do is put themselves in insert mode (using i or a) and then forget they're in a mode they need to back out of. This is because they aren't really using VIM, and they're trying to use VIM like it's notepad. This isn't VIM's fault, no matter how hard you try to blame it on VIM.

Casual VIM users also don't have the console experience to look for important things in the command line, because most of them were born after command line interfaces became rare. And VIM has a lot of command lines! q, : and / all open different command lines, to name the most commonly seen by a casual user. Is it VIM's fault that younger generations have not been taught basic CLI use? No, when VIM was made there were no alternative to CLIs, so the assumption of CLI was obvious. Rather, the alternative to CLI was possibly inconceivable at the time.

"Good" and "bad" are relative terms. You can only evaluate VIM relative to a set of standards. By modern sensibilities, VIM is strange and alien, but at the time it was developed it was a major step forward and the most awesome thing around. But it's not as clear-cut as just "old" and "new". If you evaluate VIM in terms of writing a novel, VIM sucks. It wasn't made for that, and it's not good at it. But if you look at VIM compared to using Notepad or Microsoft Word to edit code - or even Notepad++ - it has enormous advantages, which is why it is still widely used today.

To say VIM has a bad design you have to first assume a set of principles of design. If you're looking at modern UX courses designed for graphical Windows applications for first-time and casual users, of course VIM is going to fail them. It isn't for that, and it isn't trying to be that. VIM cares about whether someone experienced with VIM can do things with it better than the competitor. It's designed to provide power and control to the user, and if they burn themselves with it it's their fault. You might dislike that design, but it does what it was intended to do quite well.