Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

421–430 of 489 posts

Re: Helping a Million Developers Exit Vim

#421

I met my wife because she was stuck in VI. I was a unix sysadmin in the early 90s, and she was a grad student. She came to me for help (like most of the 1st years did) because she couldn't get out of vi. However, to be fair, this was not her fault per-say. She actually knew how to use vi, but just couldn't find the ESC key. Does anybody remember the DEC keyboards where there was no traditional ESC key, but it was F11…

I wooed my wife by being able to solve a computer problem as well. Her laptop wouldn't boot, and she had a paper on the hard drive that needed to be submitted that day. "I have just the thing," I said, and I ran home to get my drive-to-USB adapter. Pulled her hard drive, recovered the paper, and printed it from my own laptop. The rest is history.

This is why I keep a tiny bootable USB (Arch Linux) on me at all times. Future wife, here I come!

Re: Helping a Million Developers Exit Vim

#422
the hardest thing is, after their experience in trying to quit vim is then trying to tell them "No, it's actually quite an awesome editor....no it's not a piece of #$%!%.....no truly, it's good! .... oh you're back in your nice safe IDE, ok ok, we'll talk later" :)

Re: Helping a Million Developers Exit Vim

#423
post #146

Earlier quoted context omitted.

Also: Emacs is rarely if ever used in the terminal today, and exiting it through the standard desktop protocol ([X], Ctrl-[Shift]-Q, Alt+F4, ...) always works.

I use emacs in a terminal all the time (usually in a tmux session, actually). That's how I learned it (in pre-GUI days) and so it feels pretty natural. I never use the mouse with emacs, even in a GUI session.

Note that GUI emacs doesn't mean using a mouse. I use GUI emacs but almost never interact with it with a mouse, I just have a server-enabled emacs running fullscreen in one of my virtual desktops.

Re: Helping a Million Developers Exit Vim

#424

Earlier quoted context omitted.

I disagree. I use VSCode completely without mouse (and no vim mode).

Yes, you can use a lot of other editors without a mouse. The advantage of learning vim/vim mode is that you can be proficient with them without having to learn their editing keybindings. Vim mode acts as a common interface. I even use those keybindings in Chrome with cVim.

This is also not exclusive to Vim. I don't use any plugins and I have a lot of common key bindings (especially for text editing) I can use on every text editor field on my Mac (which are pretty similar on Windows). Heck I even have Emacs keybindings on OS level on macOS nearly everywhere (without installing plugins): http://jblevins.org/log/kbd

So Vim is an addition where as my key bindings work everywhere except when I go to the console where I had to learn some nano specific key bindings but which match a lot with the basic text editing keybindings from Emacs mentioned above.

Re: Helping a Million Developers Exit Vim

#425
post #316

Earlier quoted context omitted.

THIS is the "How I met your mother" we want.

And I met mine, while she needed help trying to copy paste in emacs. IDE users, you're doomed to stay single!

And to this very day, little Johnny, I thank the heavens that the sysop hadn't put CUA-mode into the /etc/skel/.emacs/init.el.

Re: Helping a Million Developers Exit Vim

#426

Earlier quoted context omitted.

Most people have no idea why vi made sense way back when (and, in my opinion, does not today). I used VT100 terminals for years on both mainframe and CP/M systems. Keyboards were not very standardized before then, the mouse did not exist and most text editors had to use all sorts of convoluted commands to allow you to do anything. http://www.vintagecomputer.net/digital/VT100/DEC_VT100_SYSBO... I ran the first version…

Why doesn't it make sense today?

To expand on rebootthesystem's excellent answers:

* Ease of learning. Any power user learning Vim now (or in the last 20+ years) is coming to it with a headful of useful, versatile conventions and shortcuts that completely don't work. God knows how many times I interrupted my flow by reflexively hitting Ctrl-Z to undo, or Ctrl-V to paste, or Shift-Arrow to highlight, or, hell, just trying to type something normally. It doesn't even sync with other command line conventions. That "Type :quit to exit Vim" message appears when you hit Ctrl-C: Vim knows what you're trying to do, but it won't do it unless you ask nicely. As far as I can tell, there's no substantial advantage to Vim's mappings except that people who already know Vim can keep using them.

Which ties into:

* Discoverability. This is less about Vim in particular and more about command-line apps in general, but still. In a GUI app, if you want to do something but don't know how, you can often find it quickly by clicking around menus, and in the process you may find something else useful that you didn't know about. On the command line, you pretty much have to tab out and search for help, whether in Google or the man pages. (And of course learning to navigate command-line help is a whole different skill in itself.

Re: Helping a Million Developers Exit Vim

#427
post #316

Earlier quoted context omitted.

THIS is the "How I met your mother" we want.

And I met mine, while she needed help trying to copy paste in emacs. IDE users, you're doomed to stay single!

Fine by me, that's more time I can spend not having to read manuals to use a text editor. :^)

Re: Helping a Million Developers Exit Vim

#428

Earlier quoted context omitted.

You should see how Sabre handles email address with it's bizarre, limited, possibly 7bit character set from 1959. In Sabre emails can be like 70 characters long. But periods count as two characters, as do underscores, and @ counts as four. I mean given the choice between period and cross of lorraine I know which I am choosing to include.

What character encoding do they use? ASCII is 7-bit, all those characters use 1 byte in ASCII, and of course email addresses were originally (and until recently?) restricted to ASCII.

Something weird:

https://sds.sabre.com/XTRANET_Access/sabre.htm

The @ is 0x2E20 in sabre hex

Re: Helping a Million Developers Exit Vim

#430

Earlier quoted context omitted.

My point is that if you don't understand what chmod 0644 does, you probably shouldn't use it as general advice. chmod 0640 would be better general advice, but it's not a fix-all. Ditto `:wq`. If you're in vim, and you don't know how to exit, you probably don't want the random keypresses you made while trying to figure out how to exit to be written to the file. Another case where an alternate version might be better:…

Of course it's not good general advice. It wasn't given as general advice. It was given as a tongue-in-cheek *nix cheat sheet.

And as such would make a funny t-shirt. I remember seeing

    # apt-get a_life
somewhere.
Post reply on HN