News for hackers. Stuff that matters.
Re:Vim is the worst editor, except all the other editors by klibertp on Thursday September 12, 2013 @06:58AM (#6373300)
One last reply from me for the time being:

> * I am moving the cursor, but I want to enter text. To do so, I need to enter colon, i, Enter, then my first text entry.

That's incorrect. You can just press 'i' to enter insert mode in place. Or upper case 'I' to have Vim enter insert mode at the end of a line. Or upper case O for insert mode at the beginning of freshly inserted line below the current. Or 'a', 'A', 'c', 'C' and many other's for other kinds of movement/change+enter insert mode combos.

> * I am entering text, but I want to move the cursor. To do so, I need to type Esc, Esc, then commence moving the cursor.

No, the arrows work (should work, may be a problem on some terminals/terminal emulators, but that's common for console editors) in insert mode. No need for <esc> (and it's single <esc>, not double, anyway) if you want to move by a few characters. Ctrl+<arrow> works in insert mode, too, so you can move by words. You lose prefixes and other kinds of movements though.

> * If while entering text, I want to do something besides move the cursor, I need to type Esc, colon, then a command letter, then its arguments.

That's only true if the command is not bound to a sequence of keystrokes. If it is, it's frequently as efficient to type as in modeless editors, for example going to a certain line in Vim is done with <esc><number>G, while in Emacs it's default binding is M-g g <number> <enter>. If the command is not bound, both <esc> : <command> <args> <enter> and M-x <command> <enter> <args> <enter> beat navigating through menus with mouse in terms of efficiency and that's what they are for, not for the commonly used commands which should be (nv)maped or global-bind-key'ed anyway.

> I don't need to "make it sound more complicated than it is."

Well, you do, as shown above.

> I wold pass the mouse cursor across the desired characters, thus selecting them (any subset of characters or words or paragraphs, and very, very fast)

Well... I would like to measure this somehow.

You assert that using a mouse for this is quicker, but present no evidence. I have no evidence for the contrary, so we can't really argue about this. I personally feel that reaching for the mouse and using it is slower than selecting text with keyboard and that the latter requires less manual precision, which matters to me. You can feel differently and I respect and accept it.

We - Vim users here - can probably show you shorter and more efficient counterpart to any example you'd come up with. That you don't know these more efficient ways is a valid criticism of Vim in itself - which is not a popular claim among Vim users, but I think so - but it's argument for Vim not being friendly to beginners, not for it being inefficient.

Re:Vim is the worst editor, except all the other editors by lutusp on Thursday September 12, 2013 @12:07PM (#6374916)
> No, the arrows work (should work, may be a problem on some terminals/terminal emulators, but that's common for console editors)

It's not common in modern times for any of this to be either necessary or justifiable. But now that we're no longer discussing how inefficient vim is, but discussing tricks meant to minimize its acknowledged inefficiency, I think we're done.

> > I wold pass the mouse cursor across the desired characters, thus selecting them (any subset of characters or words or paragraphs, and very, very fast)

> Well... I would like to measure this somehow.

You can measure it by noticing that most modern computers since 1980 have control keys, and mice, and nearly none of them have vi or vim installed. People have voted against terminal editors with their mice, and with an absolute minimum of keystrokes.

> We - Vim users here - can probably show you shorter and more efficient counterpart to any example you'd come up with.

This is the most astonishing conversation I've had in weeks. I can also show you more efficient ways to push a rock up a steep slope while wearing a hair shirt, but the risk is that some spoilsport may mention that the entire exercise is unnecessary.

I started out using vi. Then I wrote Apple Writer, which was more efficient by far. Then I dumped Apple Writer for a more efficient editor that supported a mouse. Then I dumped that editor for a better one, ad infinitum. Lazy? You bet -- I have better things to do with my time than remember vim's arcane ways to avoid the use of the keys that are on all modern keyboards, or the pointing devices that have become popular since 1970.

Re:Vim is the worst editor, except all the other editors by klibertp on Thursday September 12, 2013 @01:27PM (#6375491)
> It's not common in modern times for any of this

Any of which? Please, be more precise. You mean that it's not common for certain keys to be mixed up in console applications? Please...

> You can measure it by noticing that most modern computers since 1980 have

Oh well, you have a curious definition of measurement then.

> some spoilsport may mention that the entire exercise is unnecessary

You mean editing text is unnecessary? Or what exactly?

> I started out using vi.

I came to Vim after using Visual Studio, Komodo IDE and some others...

> Then I dumped Apple Writer for a more efficient editor that supported a mouse.

...then I dumped it in favor of Emacs, which supported much better scripting language.

> the pointing devices that have become popular since 1970

You still didn't provide any kind of evidence that editing with mouse is faster than using pure-keyboard interface. Or do you believe that it was text editing that drove mouse adoption? Are you completely sure that it was working with text that demanded mouse and made mouse popular? Is it that impossible to believe that once mouse became popular thanks to other kinds of programs the editors started to support it?

I'm glad you wrote your Apple Writer. I'm less amused by your mistaken beliefs you insist on advertising in every Vim related thread. You may be a reason I finally check out this script for not showing HN comments of specific people.

Re:Vim is the worst editor, except all the other editors by aidos on Thursday September 12, 2013 @05:27PM (#6377070)
This is one of the strangest threads I've been involved in on HN. I feel like we're just being baited by a clever troll. Attacked with adhomenens and given strawman agruements. Just to say - I'm aligned with your views and I know it doesn't matter - but it's annoying to be insulted by a hypocrite.
Re:Vim is the worst editor, except all the other editors by lutusp on Thursday September 12, 2013 @11:32PM (#6378417)
> You still didn't provide any kind of evidence that editing with mouse is faster than using pure-keyboard interface.

How about the direction of computer history? Vi was superseded by Apple Writer (and other editors, some of them better) that supported the existence of control characters, those editors were superseded by editors that supported mice, and those editors have in turn been improved on to the present day. Do you really think this was all homage to empty fashion, and that modern editors require more work than vi/vim?

Apart from that, it's been proven over and over again that pointing devices improve the efficiency of text editing, compared to an editor that only has control characters to guide the process, and much less so for editors like vi/vim that don't have the advantage of control characters.

Reference: http://www.asktog.com/TOI/toi06KeyboardVMouse1.html

Quote:

* Test subjects consistently report that keyboarding is faster than mousing.

* The stopwatch consistently proves mousing is faster than keyboarding.

End quote (BTW the above is a famous quote by a friend of mine from the early Apple days).

Remember that the above comparison, and all modern comparisons, only compare mouse-dominated use with keyboard-only use for keyboards having control characters -- none of them take on the added burden of vi/vim's modes, which result from the absence of control characters on early keyboards.

> I'm less amused by your mistaken beliefs ...

I just proved that my views aren't beliefs, they're backed up by research, and they are not mistaken. You are not arguing in good faith -- you have no evidence for your position, but you have strong feelings. Not a situation conducive to generating light, as opposed to heat.

Re:Vim is the worst editor, except all the other editors by aidos on Friday September 13, 2013 @06:00AM (#6379467)
I'm going to take the bait one more time. That's not research - it's someone talking about research in the abstract. There are no details but it's clear from the context that they're talking about something completely different.

"In the early (pre-release) days of Lisa, we had command keys instead of pull-down menus. One of the primary reasons we abandoned command keys was the difficulty of coming up with fixed definitions that could be easily transported from application to application. Users were constantly confused."

"It takes two seconds to decide upon which special-function key to press."

No, it doesn't. When my cursor is on a function name I want to change in vim, I type 'ciw' and then word is gone and I'm in insert mode replacing it. There's no 2 seconds about it.

Your research doesn't apply to this scenario and you know it. But it's fine - you do it your way, we'll do it ours. There's no problem with that.

Re:Vim is the worst editor, except all the other editors by klibertp on Saturday September 14, 2013 @08:15AM (#6385343)
Yeah, I seriously given up when I saw the "appeal to authority" of $50 million. I mean, how is this:

> We’ve done a cool $50 million of R & D on the Apple Human Interface.

Relevant to anything? I'm supposed to feel intimidated by a heap of dollars, right?

Where are the exact experiments described and results presented? Where is the paper with all of these details? I searched the web, but I couldn't find it. Perhaps I need to pay some $.

There's a commentary on this piece by Jeff Atwood, which points out the fact that the article is seriously old and that understanding of the issue has changed in the meantime. I can't say for sure, but from what little info there is in the article it seems that way - I'm not going to argue that there are efficient mouse-centric interfaces being designed and used or that the mouse should never be used as an input device. What I'm saying is that there is a least one keyboard based interface for text editing which is more efficient than equivalent mouse based interfaces - for the most part. I admit that there may be some tasks easier to accomplish with mouse (although we didn't see them yet), but that doesn't invalidate my argument, especially because if they exist, then Vim allows for mouse usage to do them.

The AskTog article is linked to from a page on Plan9 editor, Acme - it's another piece which uses ancient version of vi for comparison. It's so frustrating to see people completely ignore all the development in the Vim interface because it's early versions were much worse. And they are prominent people in our industry, too. It's just sad.

I now have some idea about what makes editing efficient. I may even create the next AppleWriter, although I think Chris Granger already does a good enough job. Almost nothing lutusp said turned out to be true, but the thinking I put into this discussion let me realize some important things about editing. So, on the whole, I don't think I wasted this time.

However, any more than this I feel would be a waste.

Re:Vim is the worst editor, except all the other editors by aidos on Thursday September 12, 2013 @07:09AM (#6373327)
I agree with all your points. Minor correction: it's 'O' to insert above the current line, 'o' to insert below.