Live data from Hacker News

History of Emacs and vi Keys (2010)

xahlee.info

51–60 of 91 posts

Re: History of Emacs and vi Keys (2010)

#51
post #20

Earlier quoted context omitted.

Is holding down one or more modifiers and pressing a key not a similar context switch? Typing 'v' enters a 'v' character, cmd/ctrl-v pastes from the clipboard. There's no logical connection between the two except that you've probably had that one memorized for decades. The difference in vim is that you don't use modifiers when you're in normal mode (usually). Side note: TWO vim modes? I guess you're never had the ple…

Two primary modes, you pedantic you. Control keys are relegated to the edges of the keyboard and easily remembered and distinguished by touch, as there are only few of them. Cmd+X, Cmd+C and Cmd+V is much more convenient, memorizable and logical (X and V visually look like editing marks on paper, for cutting and inserting respectfully; C is for Copy), than... how do you copy-paste again in vim? v/y? I see no logic th…

This just in: "P" ruled totally illogical for "paste" "V" remains totally logical though of course

Re: History of Emacs and vi Keys (2010)

#53
post #43

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

Control as a modifier key (not a bucky bit) certainly predates that, if the dates in the link are correct.

Re: History of Emacs and vi Keys (2010)

#54
post #21

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…

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

Worth noting that Mac lets you remap the control, alt, and cmd keys to one another. It's been hidden in the keyboard settings under a "Modifier Keys..." button for a major version or three now, and is stored per keyboard (nice for mechanicals with a keycap swap).

The new MBPs (possibly anything on Sierra?) add CapsLock as a mapping target and both CapsLock and Esc as a mapped value, presumably to get around only having the soft Esc key in the touchbar. It's also nice for Esc as meta, though.

That obviates the need for Karabiner in the 99% case, though I still use Keyboard Maestro for macro and text expansion.

Re: History of Emacs and vi Keys (2010)

#55

what is the difference between "backspace" and "rubout"? the emacs keyboard had both it seems, but wouldn't they be doing the same operation?

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.

Re: History of Emacs and vi Keys (2010)

#56
post #30

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.

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.

Re: History of Emacs and vi Keys (2010)

#57
post #44
post #2

tl;dr Emacs and vi keybindings are a product of inferior keyboards used at the time of their inception and not (I repeat, NOT) a superior way of text editing which philistines can't comprehend. Programmers are the worst cargo cultists.

We don't need name-calling flamebait TL;DRs on Hacker News, please. https://news.ycombinator.com/newsguidelines.html

I genuinely consider falling into established patterns and modes of interaction (i.e. a cargo cult approach) to be a serious problem for software engineers, including myself. And I think that vi and emacs keybindings are a great point illustrating this problem.

But you are the boss, boss. Won't happen again.

Re: History of Emacs and vi Keys (2010)

#58
post #43

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

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

Re: History of Emacs and vi Keys (2010)

#59
post #21

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…

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? ;) )

Re: History of Emacs and vi Keys (2010)

#60
post #56
post #30

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.

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…

Also ./ for the current folder is still used on all OS's. I think your examples predate computers having folders though.
Post reply on HN