top | item 14367207

History of Emacs and vi Keys (2010)

130 points| McMini | 8 years ago |xahlee.info | reply

85 comments

order
[+] lispm|8 years ago|reply
Neither Emacs nor the control/meta keys were invented on Lisp Machines. Emacs was written in TECO on DEC's PDP machines.

The control/meta keys actually date back to Professor Wirth at Stanford. The Stanford keyboard had control/meta then. MIT then had it in the form of the Knight keyboard.

http://www.lysator.liu.se/hackdict/split/bucky_bits.html

[+] DonHopkins|8 years ago|reply
Double Bucky

(C) 1978 by Guy L. Steele, Jr.

(Sung to the tune of "Rubber Duckie")

    Double bucky, you're the one!
    You make my keyboard lots of fun
      Double bucky, an additional bit or two:
    (Vo-vo-de-o!)
    Control and Meta side by side,
    Augmented ASCII, nine bits wide!
      Double bucky, a half a thousand glyphs,
               plus a few!
        Oh,
        I sure wish that I
        Had a couple of
            bits more!
        Perhaps a
        Set of pedals to
        Make the number of
            Bits four:
        Double double bucky!
    Double bucky, left and right
    OR'd together, outta sight!
        Double bucky, I'd like a whole word of
        Double bucky, I'm happy I heard of
        Double bucky, I'd like a whole
            word of you!
(For those of you who are interested, the term "bucky bits" comes from Niklaus Wirth, known as "bucky" to friends, who suggested that an extra bit be added to terminal codes on 36 bit machines for use by screen editors.)

http://www.art.net/~hopkins/Don/text/double-bucky.html

[+] kps|8 years ago|reply
Control as a modifier key (not a bucky bit) certainly predates that, if the dates in the link are correct.
[+] submeta|8 years ago|reply
Interesting to see the Symbolics keyboard. As an Emacs user I had reprogrammed my ThinkPad keyboard (Windows) so that

Alt -> Control

Windows-key and Menu Key -> Alt

Control keys -> Windows key

So without having ever seen a Symbolics keyboard and without knowing the history behind emacs keyboard layout I remapped my keyboard so that I had very quick access to Control and Alt (= Meta) keys.

On my Macbook it's not that easy. I could remap the Command key to become a Control key, but many Mac shortcuts heavily rely on the Command key. So that's no option.

[+] DonHopkins|8 years ago|reply
The most important thing that distinguished the Lisp Machine keyboard was that it had dedicated parenthesis keys. According to my sources, that was so you could hold a Hefty bag of nitrous oxide in one hand, and type s-expressions with the other. (Gumby can you verify this? ;) )
[+] klibertp|8 years ago|reply
I used "Keyboard Maestro" for this. I tried out some other tools, but they mostly didn't work or were too bothersome to configure. It's definitely worth the cost, as it made a Mac usable to me, although my keymap is quite different from yours, which is kind of a point with this kind of software :)

I was using Linux and StumpWM (a Common Lisp/Emacs-based WM, and Enlightenment before that) for a couple of years, so I thought that full support for personal keymaps is a given in any serious computing environment. I was pretty shocked to learn that on Mac OS you can do very little keybinding, if exchanging a few keys positions can be even called that. Fortunately, it looks like I'm going back to Linux soon.

[+] flukus|8 years ago|reply
As a tmux/vim user those extra control keys look amazing, there are too many layers fighting over too many control keys in my current setup, I'd love to have something like a dedicated vim accelerator, a dedicated tmux one, a dedicated console one and a dedicated desktop manager one.

Is anyone selling keyboards like this? What happened to those really expensive customizable keyboards from a few years back?

[+] rosetter|8 years ago|reply
Emacs user? Get a Japanese keyboard.

That's my number one piece of advice after two decades of Emacsing and one on a Japanese keyboard.

Japanese keyboards have a much shorter space bar with extra keys on either side. Remap these to control, hit them with your thumbs, and experience bliss.

I used to get 'Emacs pinky' quite frequently, but never since the switch. If you think about it, it makes all kinds of sense:

- your thumbs are strong and dextrous but totally underused in a traditional layout - most space bars are ridiculously large.. wasted real estate - your non-spacebar thumb can comfortably rest on a ctrl key so there's often no lateral movement at all

Fascinating to see others thinking along the same lines as me with keyboard remapping, and also to discover that all this time we've been trying to get closer to the keyboards of antiquity!

[+] soperj|8 years ago|reply
Any idea why the period became repeat in VIM? I've checked through old manuals, and can't quite figure out where it came from.
[+] gp2000|8 years ago|reply
In command contexts "." refers to the current line (e.g., :.,$s/a/b/ will perform the a -> b substitution from the current line to the last line of the file). That comes from ex which likely copied that from ed. I've seen "." used similarly in other contexts. 8-bit Microsoft BASIC used "." for the current line -- "LIST ." would list the last line that had been listed or edited. A number of assemblers use "." for the current assembly address.

The point being that there is a bit of a tradition of using "." for "the current thing" so there's a sort of sense in using it for the most recent command.

If you're really curious get in touch with Bill Joy.

[+] thomastjeffery|8 years ago|reply
Vi is a poor implementation of a great idea.

I would really like a modal editor in which I could configure the behavior for each key, maybe even define more modes and composable functions.

[+] strmpnk|8 years ago|reply
I've seen some work like this with 4coder. Having extensions written with native code that is dynamically linked makes this sort of thing make more sense if you want to minimize lag.

4coder is still very alpha at this point is easy to break but the low level primitives exposed leave it open for easy experimentation with little cruft to peal away first. It also very C++ focused so YMMV.

[+] yorwba|8 years ago|reply

  :help map.txt
[+] flukus|8 years ago|reply
Emacs? It has a gajillion modes.
[+] alexeiz|8 years ago|reply
I smell an Emacs user!
[+] tetraodonpuffer|8 years ago|reply
what is the difference between "backspace" and "rubout"? the emacs keyboard had both it seems, but wouldn't they be doing the same operation?
[+] ScottBurson|8 years ago|reply
On an ASR33 Teletype, backspace simply moved the carriage one character position to the left.

Rubout was a different concept entirely. The ASR33 had a paper tape punch and reader. The Rubout character was 0x7F, i.e., it had all bits set. So, to "rub out" an erroneous character from the paper tape, you could back the tape up in the punch to the desired character (by pressing a button on the punch; there was no character that invoked this function) and hit Rubout; this would punch the tape at all seven holes, changing whatever character had been there to a Rubout. (The software ignored Rubout characters on input.)

When the world moved on from Teletypes, it was natural for people to want a single keystroke that meant "delete the previous input character". But there was evidently some divergence of opinion in the industry as to whether that should be Backspace or Rubout -- notwithstanding that the ASR33's concept of Rubout didn't really map at all onto the new hardware.

[+] teddyh|8 years ago|reply
Since that keyboard does not seem to have a “Delete” key, I assume that “Rubout” performs that function.
[+] simtel20|8 years ago|reply
This is probably a holdover from typewriters. Backspace moves the cursor. Rubout erases.
[+] njharman|8 years ago|reply
I never understood appeal of wasd. Maybe my fingers are shorter. It's way easier for me to have all three on same line so I change S to fwd and X to back.
[+] atemerev|8 years ago|reply

[deleted]

[+] epistasis|8 years ago|reply
Having caps lock where it is on current keyboards is in no way a superior design. It's a useless key in a prime location!

Give me those "inferior" keyboards any day.

[+] zck|8 years ago|reply
Do you have better designs? If you're using Emacs-style editing, you want Ctrl shortcuts. If you're using vi-style modal editing, you want single keys to move around. What would you recommend?

Note that moving your hand to the arrow keys is, while more intuitive, slower and requiring more thought than the other options presented (once these options are learned).

[+] AlexandrB|8 years ago|reply
That's a bit of an oversimplification. Especially given how none of those keyboards look THAT different than what we use today. In particular, Vim's use of the home row for movement is objectively better than moving your hand off the home row and using the arrow keys (which you can do if you wish as well). I'm sure if someone was creating Vim today, they might choose WASD instead since many are familiar with the use of those keys for movement in gaming.
[+] arca_vorago|8 years ago|reply
I think the main difference between the vi(m)/emacs users and others is that they actually use the keyboard as their general home more. Not just programmers, but sysadmins, office workers, etc, spend far too much time in habit-formed inefficiencies of input.
[+] tty7|8 years ago|reply
One day i'll be able to downvote