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

1

u/WillMengarini May 24 '17

Suppose your system is set up with EDITOR=vim, and you commit from Git [...] You didn't type Vim. It doesn't tell you it's Vim. If you haven't seen Vim before, how are you going to know what to even look up?

I ranted about this in Emacs code I published so long ago that when I search for it now, Google thinks I'm searching for articles about George Orwell written in Spanish (and quotes are ignored): [something about what the code did], & let me tell you a story: when I first wanted to learn Emacs, the only access I had to it was on a Unix shell on a dial-up ISP that I reached via an 80286 emulating a VT100, & I had absolutely no documentation whatsoever; the ISP's staff were having a bad-hair year, the installation didn't have a man page, & I didn't know about Info yet; but I remembered being told that C-h was help.  So I tried that, & C-h had been helpfully improved to backward-delete-char in the site's default.el.  DEL, transmitted by <Backspace>, was also backward-delete-char.  <F1> didn't mean help (the reason why not is addressed below).  The only reason I was even able to EXIT THE PROGRAM, the only reason I didn't need to generate a SIGHUP by hanging up the modem just to get out of Emacs, was that I knew about C-x C-c from some guy who used the Epsilon editor.  It was SEVERAL DAYS before I learned how to run M-x help-on-help.  And that of course sucks, so I didn't learn much Emacs until an upgrade by a new sysop eliminated this "improved" keymapping. NEVER DO THIS AT THE SITE LEVEL!  Wanting to swap <Ctrl-h> and <Backspace> is perfectly reasonable, but it should be implemented in personal .emacs files, never in default.el.

The same reasoning applies to setting EDITOR in /etc/bash.bashrc.