Live data from Hacker News

Vim is the worst editor, except all the other editors

andre.arko.net

111–120 of 145 posts

Re: Vim is the worst editor, except all the other editors

#111
post #41
post #27

Earlier quoted context omitted.

> I would actually love to hear some specific and insightful criticisms of Vim ... Sure, no problem: * It's still a command-line editor. Just like vi. * To perform multiple operations, like moving the cursor around, entering text, deleting text, searching the document, saving and loading files, requires you to switch modes. Just like vi. * It cannot take advantage of the modern computing environment -- mouse navigati…

> * To perform multiple operations, like moving the cursor around, entering text, deleting text, searching the document, saving and loading files, requires you to switch modes. Just like vi. All these operations, except entering text, are available from "normal" mode which is the default mode. This is factually incorrect that you need to switch mode to delete something, or save a file.

> All these operations, except entering text, are available from "normal" mode which is the default mode.

Assertion: vim has modes.

> This is factually incorrect that you need to switch mode to delete something, or save a file.

Assertion: vim doesn't have modes.

Only one of the above claims can be true. Choose which one you want to defend, and delete the other. But don't try to delete it with vim, or we'll be here all day.

In point of fact, if I am entering text, I cannot move the cursor, search for text, save a file, load a file, or a dozen other things, without first switching modes.

I feel like I'm discussing whether there was a literal garden of Eden with a religious True Believer. True Believers famously make claims they haven't bothered to compare to reality before speaking.

Re: Vim is the worst editor, except all the other editors

#112
post #77

Earlier quoted context omitted.

> I'll point out that any modern version of vim uses mice just fine. It also uses the system clipboard just fine. What you see as vim appearing to exploit a mouse and system clipboard is actually Bash and (sometimes) a command-line app (example Konsole) doing so, or equivalent utilities outside vim in a non-GUI level. Those features work with any editor in exactly the same way. As to using the system clipboard just f…

> Right -- the mouse was foisted on a gullible public willing to suffer a reduction in efficiency in order to have an electronic pet, all against their better interests. And the industry's usually diligent efficiency experts were all bribed to overlook the reduction in efficiency you've just brought to our attention. I'm not sure if you're just joking or you're just misinformed. For text editing, mouse is more ineffi…

> For text editing, mouse is more inefficient than keystrokes

Your evidence for that is provided by the fact that the world eagerly adopted the mouse and abandoned vi/vim and similar programs, based solely on the advantages of modern methods.

Your evidence for that is provided by the fact that I wrote an incremental improvement over vi, one that exploited the existence of control keys but didn't exploit a nonexistent mouse, and, even though it represented no great improvement, I retired on the proceeds at the age of 35. (My program was appropriately eclipsed by better, more advanced programs, that among other things did exploit the mouse.)

> I'm not sure if you're just joking or you're just misinformed.

Wake up and smell the Cappuccino. You are not living in reality.

Re: Vim is the worst editor, except all the other editors

#113
post #89

Earlier quoted context omitted.

> I hate vim too, but some of your points are simply not true Your claim is that what I said is false. > Sure, some commands need you to switch modes, but not all. Your claim is that what I said is true. Only one of the above comments can be so. If one is true, then the other is false. Take your pick.

No, you're wrong and he is right and now it is clear that you're just laughing

> No, you're wrong and he is right ...

That's for sure. In a single post he asserted both that there are modes, and there aren't modes. That leaves no room for another viewpoint.

There's one sure way to win an argument -- assert all possible viewpoints, declare victory, and depart the field.

Re: Vim is the worst editor, except all the other editors

#114
post #110

Earlier quoted context omitted.

> No, to switch from entering text, to deleting text, to searching for text, to copying and pasting text, to saving a file, to loading a file, all require switching modes. Let's be honest. Please define a mode and define mode switching. It's obvious we use different definitions for those and so we can't have meaningful discussion.

> Please define a mode and define mode switching. If I'm entering text, I cannot move the cursor. Mode one. If I'm moving the cursor, I cannot enter text. Mode two. If I'm using a modern editor, these modes are not present -- if I want to move the cursor, I press the appropriate keyboard keys. Instead of pressing a letter key to insert a letter, I press the up-arrow key to move the editing cursor, without any prelimi…

Yes. What editor are you talking about?

The reason I ask is because in vim, I can move the cursor with my arrow keys when I'm in insert mode, and if I wanted to, I can select blocks of text with my mouse, without pressing any key to change mode.

In addition to those features I can move about more efficiently without moving my hands from the keyboard, by changing mode. I touch-type, and I write for a living, so this is quite important to me, but assuming the features you mention are the most important ones to you and that you don't want to change modes, you can still do the things you say you can't. Well, I can. Not sure if you can, but I'm fairly sure it's not due to any limitation of vim. I'm curious how you appear to be mistaken in some very basic facts.

Re: Vim is the worst editor, except all the other editors

#115
post #87

Earlier quoted context omitted.

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 .v…

> Elsewhere in this thread you're saying that Vim can't use mouse and clipboard. Of course it can - "=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 contr…

[deleted]

Re: Vim is the worst editor, except all the other editors

#116
post #113

Earlier quoted context omitted.

No, you're wrong and he is right and now it is clear that you're just laughing

> No, you're wrong and he is right ... That's for sure. In a single post he asserted both that there are modes, and there aren't modes. That leaves no room for another viewpoint. There's one sure way to win an argument -- assert all possible viewpoints, declare victory, and depart the field.

Declare what victory? I have no* stance in superiority of the whole modal vs. non-modal deal. Whenever I have a choice, I pick a modern GUI editor, just like you.

Far from "[asserting] all possible viewpoints", I mentioned specific keystrokes that you could try out too. If you are in insert-mode, and use arrow keys to visit a different location, you'd continue to be in insert-mode. Is it implemented as a secret hack to quietly enter and exit the scroll mode when arrow keys are pressed? I neither know nor care. However, in this usage scenario, modes are not exposed to the end-user.

* actually, I do like modal behaviour, but in very few cases. In MS Windows, it used to be the case that Win-space z would put the window in resize-mode. One could then use arrow keys to resize the window. There was a similar sequence for moving windows too.

Re: Vim is the worst editor, except all the other editors

#117
post #87

Earlier quoted context omitted.

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 .v…

> Elsewhere in this thread you're saying that Vim can't use mouse and clipboard. Of course it can - "=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 contr…

Your arguments are inconsistent and frequently plainly wrong. You refuse to recognize them as such even if they are proved to be false multiple times. Instead you're skipping from one argument to another, if we're lucky enough to hear actual argument, because for the most time you're just saying that Vim sucks because you think it sucks. It's really hard to have a discussion in such a setting and because I know you're not going to improve, I tried to do it for you. Here is an index of lutusp arguments why Vim sucks, gathered from this thread - without those I already answered, because I'm not that fixated on the topic.

About keyboard, mouse and clipboard support:

> Not only do modern keyboards have control keys, but modern computers have mice and other pointing schemes.

> 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.

> * It cannot take advantage of the modern computing environment -- mouse navigation, different fonts, text styling, page layout, or anything else. Just like vi.

> Keyboards have changed, but vi hasn't. Computers have mice and touch-sensitive displays, but vi can't exploit them. Operating systems have clipboards, but vi can't take advantage of that convention. You know -- don't get me started.

> * No clipboard support -- all copying and pasting operations, apart from being another example of bizarre vi incantations requiring the recall of a raft of magic characters, is within vi/vim and disregards the system clipboard.

> What you see as vim appearing to exploit a mouse and system clipboard is actually Bash and (sometimes) a command-line app (example Konsole) doing so, or equivalent utilities outside vim in a non-GUI level. Those features work with any editor in exactly the same way.

> As to using the system clipboard just fine, you can copy text from vim or any other displayed source of text, but you cannot paste it, because it's not vim that's acting, or is in any way aware that text has been copied.

That's what you wrote. It's all false. First, let's level the playing ground - we're now talking about GVIM, which comes with every Vim installation (unless NO_X11 or something is defined at compile time). Whenever you see the word "Vim" below it means GVIM. To make sure we're really talking about the same thing, here are some screenshots of GVIM in action:

http://screenshots.en.sftcdn.net/en/scrn/92000/92299/gvim-7.... http://www.kianryan.co.uk/wp-content/uploads/2012/09/Screens... http://labnotesh.files.wordpress.com/2008/12/gvim-windows.pn...

This way we can avoid going into terminal emulator and consoles details, and focus on Vim itself rather than on things it can be accessed through.

Ok, so first the keyboard and modifiers keys. It has been told you many times already that Vim supports those. It should be evident from the fact that Vim manual describes default keybindings with modifiers in them. For the example look here: http://vimdoc.sourceforge.net/htmldoc/windows.html#window-mo...

This makes your claim false - apparently Vim doesn't have to "avoid all control keys" (or "work exactly like Vi", but that's another matter).

Second, mouse. Of course it is supported, as explained here: http://vimdoc.sourceforge.net/htmldoc/usr_09.html#09.2 and here: http://vimdoc.sourceforge.net/htmldoc/gui.html#gui-mouse

It is even mentioned that the mouse works in console version, but let's leave it for other time and keep the argument simple. The point is that you can use the mouse for everything you would use it in other editors out of the box, and if not, then you can easily remap it to do something else.

Which makes you claim about Vim not supporting mouse obviously false.

The systems' clipboard support is of course available too. Actually, it is exposed by default via two special purpose registers, named 'star sign' (the thing that makes text italic here...) and '+', which is documented in http://vimdoc.sourceforge.net/htmldoc/gui_x11.html#x11-selec... Note that on Windows the latter is an alias for the former, because the system has only one clipboard. There are commands for placing text in registers, appending to registers and pasting from registers and they work in exactly the same way with 'native' registers and with the ones representing OS clipboard. So it's, of course, completely false that Vim doesn't support clipboard.

One thing of note, you wrote:

> Four characters. Very efficient.

in response to me pointing out how to get the text into clipboard. Well, it's because by default Vim doesn't use OS clipboard as a default register, but you can of course make it do so. If you really want.

On efficiency and modes:

> Some of them might even think it's natural to have to use twice as many keystrokes as are required on a modern editor, even another command-line editor, to switch from editing to navigating (as just one example)

> No, to switch from entering text, to deleting text, to searching for text, to copying and pasting text, to saving a file, to loading a file, all require switching modes. Let's be honest.

> Having to enter additional keystrokes, a throwback to a computer keyboard that either didn't have control keys or couldn't exploit them, makes editing "faster and more powerful"? Nice reasoning.

> * To perform multiple operations, like moving the cursor around, entering text, deleting text, searching the document, saving and loading files, requires you to switch modes. Just like vi.

> It is less efficient. But you are now obviously trolling, posing arguments that no rational person could possibly accept. "So, a few more keystrokes for each command, repeated for each such command. So what? Are you in a hurry to get somewhere? Do you want to live forever?"

Well, you basically say that having modes is less efficient than not having them. The problem here is that you don't present any evidence to back this claim. You say that you need to press more keys when working with Vim, but despite multiple people asking you to, you don't give even one realistic scenario where it would be less keystroke to perform an action in other editor. The few examples you provided were unnecessarily verbose and you were given shorter versions, which require at most the same number of keystrokes as other editors. And it's without custom mappings.

Despite this - and despite the fact that I even included for changing the mode and still got shorter commands - you're convinced that having modes necessitates more keystrokes to perform an action. I'm at a loss here, how could I ever convince you otherwise? You didn't even post any more examples of what you think takes more time in Vim as if you thought that the previous ones are enough to prove your claim. It's silly - and false. Of course.

The truth is that having modes allows for not using modifier keys, except for one. Without modes you need to use them, because you have no other way of differentiating text input and commands. And that's all modality does, by itself - replaces a few modifier keys with a single one. It has no impact on average count of keystrokes.

For example, copying a full line of text in other editors goes like this (well, using a mouse is an option, but until it's proved or disproved to be fatser than keyboard for text editing I'm not going to include it):

Home, Shift+End, Ctrl+C

In Vim, thanks to modality, the command doesn't involve modifier keys and is equally long (or if you count pressing modifiers as keystrokes - shorter):

yy

For replacing text inside parens, starting from inside:

go to one of the parens, Shift+Alt+arrow, arrow in opposite direction (to deselect matching paren), and start writing (inserting deleted paren)

In Vim:

ci(

Moving a paragraph below another one:

go to the beginning of the paragraph, press shift+arrow down enough times, ctrl+x, move to the end of next paragraph, ctrl+v

(No wonder using mouse is more efficient than this!)

In Vim:

dip}p

And so on. Of course, you can shorten the modeless commands by introducing additional, special purpose commands, so don't take them seriously, but that's not the point - do you really think you can shorten them any more than what Vim does? If so, please show us. No mouse please.

Anyway, if keystrokes count remains the same, why bother with modality? I don't know, to be honest. Vim proponents claim that (with mapped to CapsLock key) they never leave home row. I'm not a touch-typist and so I don't feel it's a great difference. But at the same time I can't see why is it a bad thing. The keystrokes count stays the same. Chaining is easier, especially when using numerical prefixes. There is a bit of an overhead in that you need to learn of various commands for changing modes - and everyone using Vim admits this - but that does not hamper efficiency in any way once learned.

I wanted to, but I think I won't comment on the rest of what you wrote, because it carries no substance whatsoever. We're really not interested in ed, ex and vi early history, we're talking about current versions of Vim, which is, contrary to what you say, != vi. So here you go, your claims at least commented at length. I hope it's enough and that I will be able to just paste the link to this post under your Vim related comments in the future.

Re: Vim is the worst editor, except all the other editors

#118
post #108

Earlier quoted context omitted.

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', '…

> 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 desi…

> 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

#119
post #74
post #58

Earlier quoted context omitted.

Nice ad hominem. Using vi before any of us was born does not mean you avoided the classic "vim newbie" mistake.

> Nice ad hominem. How is calling you young, saying you have your entire life in front of you, an ad hominem ? Except possibly to suggest that you have a quota of mistakes you need to go through before you become more efficient at avoiding them?

>saying you have your entire life in front of you

That's not what you said... you said he was too young to know vi/vim better than you. If you haven't used it in 30 years how would you know vim any better than a younger person? Why would age have anything to do with recognizing the benefits and drawbacks of various text editors? My grandparents barely knew how to turn on a computer... they wouldn't try to teach me that notepad is a better text editor than vim. I'm not discounting your experience (you definitely have more than most people here) but your arguments here could be better.

Re: Vim is the worst editor, except all the other editors

#120
post #14

The reason there's no project-wide find and replace in vim is that vim has no concept of a project. It's designed to be one of many tools, which works really well for some workflows and not for others. #5 is the same deal -- they're limited by the design of vim, and that design doesn't fit anything like TextMate's project search. It would drive me _crazy_ if vim saved without me telling it to. I think a lot of people…

The only thing that drives me crazy about the save/do-you-want-to-reload prompt is actually a git related issue. When you commit, git updates all committed files in some way that triggers vim change detection. You go back to vim, write some code, try to save and then you get this DANGER WILL ROBINSON message. It's horrible because you're not quite sure sometimes if there was a legitimate change made in another proces…

gitattributes or autoclrf could do that if not configured properly. I never have that issue when working on personal projects using vim and git.
Post reply on HN