News for hackers. Stuff that matters.
Re:How I Collected a Debt from an Unscrupulous Merchant by hajimemash on Sunday December 06, 2020 @01:20AM (#25321566)
As a non-vi user, I feel very excluded :( ^H means backspace guys. And probably the same type of CEO that wants to make money by not paying out affiliates
Re:How I Collected a Debt from an Unscrupulous Merchant by segfaultbuserr on Sunday December 06, 2020 @04:22AM (#25322262)
^H is the ASCII control character for backspace. It has nothing to do with vi, and everything to do with a terminal. It used to be common knowledge that when you press Backspace, sometimes ^H appears on your screen (if the program in question couldn't handle control characters natively). Naturally, in forum posts it started to have the meaning of "delete" for humorous purpose.

Its modern equivalent is HTML tag <del></del>, which also means "delete" due to the common knowledge of its meaning. One doesn't have to be a front-end developer to understand <del>, and one didn't have to be a vi user to understand ^H.

Re:How I Collected a Debt from an Unscrupulous Merchant by notRobot on Sunday December 06, 2020 @01:22AM (#25321575)
Off-topic, but why map a function to a multi-key combination when it already has a key dedicated to it?
Re:How I Collected a Debt from an Unscrupulous Merchant by detaro on Sunday December 06, 2020 @01:33AM (#25321623)
caret notation just maps all ASCII control characters to ^ + letter, many of which do not always have keys. "Backspace" is 0x08 = 8th letter is H = ^H

it's also not just used as an input, but also what a terminal that can't do or doesn't understand a backspace as "delete character, step to the left" prints instead.

Re:How I Collected a Debt from an Unscrupulous Merchant by LukeShu on Sunday December 06, 2020 @02:31AM (#25321837)
Not just letters! "^X" indicates "X, but with the control-bit flipped", where the control-bit is the left-most of ASCII's 7 bits.

    1001000 ASCII 'H'
    1000000 "ctrl bit"
    0001000 ASCII backspace
But like I said, it's not just letters, if you use `cat -v` to show all non-printable characters in this notation, you'll also see things like "^@" for the 0x00 null byte and "^[" for the ESC. All of the terminal color-code control sequences start with ESC, so if you pipe colorized output to `cat -v`, you'll see a lot of "^[".
Re:How I Collected a Debt from an Unscrupulous Merchant by account42 on Monday December 07, 2020 @09:26AM (#25332373)
Huh I guess that explains why they chose [ as the second byte in the initiator for color control sequences: ESC [ = ^[ [
Re:How I Collected a Debt from an Unscrupulous Merchant by spijdar on Sunday December 06, 2020 @01:33AM (#25321624)
^H is the ASCII control character for "backspace".

https://en.wikipedia.org/wiki/Control_character

Re:How I Collected a Debt from an Unscrupulous Merchant by apearson on Sunday December 06, 2020 @01:29AM (#25321601)
I would guess it's a side effect of having all ascii control chars mapped to key combos [1]

[1] https://en.wikipedia.org/wiki/ASCII#Control_code_chart

Re:How I Collected a Debt from an Unscrupulous Merchant by andreareina on Sunday December 06, 2020 @04:01AM (#25322178)
I don't remember what I was connecting to, but I've had telnet sessions that couldn't process backspace etc, so I had to use the ESC-<key> mappings.
Re:How I Collected a Debt from an Unscrupulous Merchant by calvinmorrison on Sunday December 06, 2020 @01:26AM (#25321589)
Early keyboards maybe? Hjkl vs jkl;
Re:How I Collected a Debt from an Unscrupulous Merchant by yjftsjthsd-h on Sunday December 06, 2020 @02:36AM (#25321859)
I don't think that's the answer to the backspace=^h question, but HJKL is precisely an artifact of the keyboard that vi was first used on: https://en.wikipedia.org/wiki/File:KB_Terminal_ADM3A.svg / https://en.wikipedia.org/wiki/Vi#Creation - in addition to HJKL being labeled as the arrow keys on that keyboard, also note the far superior placement of escape and control where modern keyboards typically place tab and caps lock; this also made vi a lot more sensible.

(And of course that last bit is a whole topic unto itself; to this day, caps lock is the dumbest key on the whole keyboard to me - mostly useless, takes up prime real estate, and 100% worth remapping on every machine I control. But that's a rant for another day:])

Re:How I Collected a Debt from an Unscrupulous Merchant by toomanyrichies on Sunday December 06, 2020 @01:27AM (#25321592)
Because the h-key is in the middle row of the keyboard, meaning relatively shorter keyboard distance needed to execute that common command, thereby saving typing time.