Vim is a usability nightmare | Terminally Incoherent

 6 years ago
source link: http://www.terminally-incoherent.com/blog/2012/09/05/vim-is-a-usability-nightmare/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Vim is a usability nightmare

About two weeks ago I got scolded by someone on Twitter for corrupting the young impressionable minds by advocating and evangelizing the use of Vim as a text editing and programming tool. It sparked quite an interesting discussion, and in the end, being a nice guy I agreed to disagree and let my peer in geekery have the last word.

I believe the crux of the argument was that Vim is a usability nightmare – it has a very steep learning curve, sparse UI and it doesn’t use the standard key bindings. Or rather it doesn’t support one of the many, often contradicting sets commonly used key bindings. I mean, let’s face it – there is no standard here.

Yes, almost everyone agrees which binding to use to save, cut, copy, paste and undo but beyond that few editors agree. What is the standard key for redo? Quit without saving? Open a new tab? Search and replace? Few editors agree on these, so knocking Vim for being only slightly more quirky than everyone else. Especially since the latest versions of the editor ship with an “easy” mode that eschews modal editing and makes it behave like a glorified Notepad. Or you can just download Cream if you are so inclined.

To me this is a waste, because Vim’s power lies in the modal editing. Vim is powerful because it ships with an incredibly rich set of commands that can be chained together forming a kind of a language. A lot of people dismiss Vim’s interface as simply being backwards. I heard people say that vim “drives” the way it does because it is developed by unix beardos and dinosaurs that refuse to accept change. This is obviously wrong, as evidenced by projects like Cream or the easy-mode in the default bundle. You can make Vim “user friendly”. It is just that most vim users don’t want it to be “user friendly”. This is not the selling point of the editor.

The selling point of Vim is the raw power. It is the internal “editing language”, reach feature set, configurability and huge library of plugins and the VimL – the embedded, Turing complete scripting language. Vim is a power tool, and as all power tools it trades off usability for raw power and flexibility. Vim is the Hole Hawg of text editors:

Hole Hawg

Hole Hawg Power Drill

People sometimes need metaphors to understand complex computing concepts. I didn’t make this one up – this one was born in the mind of none other than Neil Stephenson who compared Unix OS to the Hole Hawg power tool. But I think the metaphor can be extended to serve the Vim vs modern editors argument. To quote Stephenson:

The Hole Hawg is a drill made by the Milwaukee Tool Company. If you look in a typical hardware store you may find smaller Milwaukee drills but not the Hole Hawg, which is too powerful and too expensive for homeowners. The Hole Hawg does not have the pistol-like design of a cheap homeowner’s drill. It is a cube of solid metal with a handle sticking out of one face and a chuck mounted in another. The cube contains a disconcertingly potent electric motor. You can hold the handle and operate the trigger with your index finger, but unless you are exceptionally strong you cannot control the weight of the Hole Hawg with one hand; it is a two-hander all the way. In order to fight off the counter-torque of the Hole Hawg you use a separate handle (provided), which you screw into one side of the iron cube or the other depending on whether you are using your left or right hand to operate the trigger. This handle is not a sleek, ergonomically designed item as it would be in a homeowner’s drill. It is simply a foot-long chunk of regular galvanized pipe, threaded on one end, with a black rubber handle on the other. If you lose it, you just go to the local plumbing supply store and buy another chunk of pipe. (…)

I myself used a Hole Hawg to drill many holes through studs, which it did as a blender chops cabbage. (…) Where my homeowner’s drill had labored and whined to spin the huge bit around, and had stalled at the slightest obstruction, the Hole Hawg rotated with the stupid consistency of a spinning planet. When the hole saw seized up, the Hole Hawg spun itself and me around, and crushed one of my hands between the steel pipe handle and a joist, producing a few lacerations, each surrounded by a wide corona of deeply bruised flesh. It also bent the hole saw itself, though not so badly that I couldn’t use it. After a few such run-ins, when I got ready to use the Hole Hawg my heart actually began to pound with atavistic terror.

But I never blamed the Hole Hawg; I blamed myself. The Hole Hawg is dangerous because it does exactly what you tell it to. It is not bound by the physical limitations that are inherent in a cheap drill, and neither is it limited by safety interlocks that might be built into a homeowner’s product by a liability-conscious manufacturer. The danger lies not in the machine itself but in the user’s failure to envision the full consequences of the instructions he gives to it.

When people tell me about their swanky modern editors such as TextMate or Sublime Text I see this:

Homeowners Power Drill

Homeowners Power Drill

I see a home owners power drill. Don’t get me wrong – it is a nice tool. It has that nice ruberized pistol grip and a neat ergonomic design. You can operate it one handed, it is wireless, light, portable and pretty easy on the eyes. It is a nice tool. But it is not vim. It has a lot of features, and it is a joy to use but it is not even in the same league as vim.

Can you re-define every key, combination and command in these editors? No you cannot. Do these editors ship with a domain specific scripting language whose sole purpose is creation of plugins and extensions? No, most don’t.

Saying that Sublime Text or TextMate have “roughly the same feature set” as vim is like saying that Honda Civic has roughly the same feature set as the Harrier Jet because it can be used to get from point A to point B. The only editor that is in the same league as Vim is Emacs. And I wouldn’t call Emacs user-friendly either.

These editors are power tools for power users. Not everyone needs a Hole Hawg. In fact, not everyone should use a Hole Hawg. Which is why the market for plastic, safety-enabled home owners power drills exists. The Hole Hawg is a specialized tool for professionals and it takes certain amount of practice, skill and responsibility to use. Which is not to say it is not suited for those outside the construction industry. An amateur builder can pick it up, and learn to use it just as easily – and probably never use another “power drill” ever again. Conversely, a lot of people will probably see a Hole Hawg and wonder why on earth anyone outside heavy construction would ever want to use such a monster. And it is an equally valid point of view.

Different programming ecosystems exist to fill different needs and styles of individual coders. Usability is important, but it is only one axis of the spectrum. It is not be all and end all of computing. Raw power and configurability are very important too and sometimes you have to make trade-offs.

If you don’t like Vim, don’t use it. But don’t knock it for being backwards. Do people really think we use vim just to be cool, retro hipsters? Would we willingly subject ourselves to a “clunky usability nightmare” just for the geek cred?

Perhaps we simply do not see eye to eye on what “usability” actually means. To me, a usable tool is one that lets me do my work efficiently, comfortably and without getting in the way. Vim does that, and more. In the hands of an experienced user, Vim is extremely powerful and flexible. It can do things other editors will never be capable of (except maybe Emacs but we’re not talking about that right now). But is it newbie friendly? Does it have a gradual learning curve? Not really.

Well, it kinda does. It has the training wheels easy mode. The Windows version actually ships with common Save, Copy, Cut and Paste bindings. Getting into Vim is not entirely like hitting a brick wall. But what Vim offers is a bit of a different approach toward text editing – it approaches it from a different direction than most text editors. As such it is a different tool for different people.

Don’t like using it? That’s perfectly ok. There are hundreds other editors out there. Don’t think it can help you be more efficient? That’s all right, we all have to find our own way. But don’t knock it as an outdated relic of a bygone era.

Vim is like a Ligtsaber. Not as clumsy or as random as your average text editor. An elegant weapon… for a more civilized age. And it takes a little bit of skill, understanding and respect to use it properly.

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK