News for hackers. Stuff that matters.
Re:Helping a Million Developers Exit Vim by Houshalter on Tuesday May 23, 2017 @06:05PM (#14405779)
I just hate programs that change patterns that are standard everywhere else. E.g. 99% of software uses control+c and control+v to do copy and pasting, so of course software that maps it to something totally different is going to be very frustrating. The same thing with vim using nonstandard way of quitting.

Discoverability is another problem. You can have weird keyboard commands, but make it possible to find them without searching stack overflow. I miss when applications had a big bar at the top of all the commands you could do and their keyboard shortcuts. I'm on chrome right now, and copy and paste is hidden away in a menu. And the keyboard shortcut for it isn't mentioned. How do you think people learned the keyboard shortcut in the first place? Or apple phones have a bunch of gestures that are useful, but no one knows about because you can't discover them.

Re:Helping a Million Developers Exit Vim by dllthomas on Tuesday May 23, 2017 @06:13PM (#14405837)
Approximately 0% of terminal programs use control-c as copy. Conventions depend on context.

"Control-C sends SIGINT" has been a standard for longer than "Control-C means copy".

Re:Helping a Million Developers Exit Vim by Houshalter on Tuesday May 23, 2017 @06:31PM (#14405975)
I'm well aware of that and the historical reasons that it's the case. I'm just using it as an example of breaking well established patterns that screw new users.
Re:Helping a Million Developers Exit Vim by boxfire on Tuesday May 23, 2017 @07:14PM (#14406272)
^C as copy is an example of breaking well established patterns that screw new users. Its THE canonical example in fact.
Re:Helping a Million Developers Exit Vim by photojosh on Tuesday May 23, 2017 @09:40PM (#14406987)
^C is SIGINT. ⌘C is copy.

I blame Microsoft.

Re:Helping a Million Developers Exit Vim by isostatic on Wednesday May 24, 2017 @12:22AM (#14407596)
Didn't Ms"S use to use CTRL-Ins or similar?
Re:Helping a Million Developers Exit Vim by JdeBP on Friday May 26, 2017 @12:24PM (#14425197)
The name that you want to look up is Common User Access.
Re:Helping a Million Developers Exit Vim by photojosh on Wednesday May 31, 2017 @11:53PM (#14457887)
Well TIL, thanks! Interesting to know the history.

(I still have a few Windows apps we use at work that use these standards; good to know they actually were a standard.)

Re:Helping a Million Developers Exit Vim by Houshalter on Tuesday May 23, 2017 @09:15PM (#14406894)
I really don't care who is responsible or which came first. I'm only pointing out the inconsistency and the problems it causes.
Re:Helping a Million Developers Exit Vim by wruza on Tuesday May 23, 2017 @11:19PM (#14407373)
Don't worry, in few years new bindings will be familiar to new people straight from their birth date. Then they will complain about changes and you'll tell them that changes were made long before.
Re:Helping a Million Developers Exit Vim by majewsky on Wednesday May 24, 2017 @06:14AM (#14408870)
Shortly after the introduction of the first generation of brain-computer interfaces: "Why do I have to think of Ctrl-C to copy text in this program? All the other programs have me think of a banana to copy a selection!"
Re:Helping a Million Developers Exit Vim by yohui on Tuesday May 23, 2017 @11:11PM (#14407343)
> I'm on chrome right now, and copy and paste is hidden away in a menu. And the keyboard shortcut for it isn't mentioned. How do you think people learned the keyboard shortcut in the first place?

Copy and paste are also in the right-click menu, and the keyboard shortcuts are shown there.

Re:Helping a Million Developers Exit Vim by kevin_thibedeau on Tuesday May 23, 2017 @09:35PM (#14406970)
Vi predates the Ctrl+C.X.V convention. Shame on all those Windows apps for not using the Esc key properly.
Re:Helping a Million Developers Exit Vim by Glyptodon on Wednesday May 24, 2017 @01:24AM (#14407782)
I hate VI not defaulting to wasd for movement like every other single piece of software I used growing up... (e.g. Quake, Marathon...) Ha ha ha. (Or should my games have used hjkl)?
Re:Helping a Million Developers Exit Vim by dllthomas on Wednesday May 24, 2017 @01:33AM (#14407804)
As I recall, both Quake and Marathon defaulted to arrow keys for movement. Half-Life was the first time I encountered WASD out-of-the-box.

> (Or should my games have used hjkl)?

I still play a game that does...

Re:Helping a Million Developers Exit Vim by flukus on Tuesday May 23, 2017 @08:49PM (#14406767)
> The same thing with vim using nonstandard way of quitting.

How do you quit man? How do you quit less?

'q' to quit is pretty standard in the TUI world.

Re:Helping a Million Developers Exit Vim by Houshalter on Tuesday May 23, 2017 @09:19PM (#14406911)
I tried it and typing q does not seem to exit the program. Nothing I tried worked and I had to exit the whole terminal.
Re:Helping a Million Developers Exit Vim by flukus on Wednesday May 24, 2017 @02:10AM (#14407919)
Well it's not quite that simple because it's more complicated than those tools. Once you are in ex mode ':' though it uses the standard exit key.

As for if you stuck in insert mode, this is more akin to when you have text highlighted in a GUI editor, the shortcuts change because you're in a different mode.

Remember all editors have modes, vim is just a bit more in your face with them.

Re:Helping a Million Developers Exit Vim by ecshafer on Tuesday May 23, 2017 @10:03PM (#14407098)
You have to type :q to quit. : Is the command mode.
Re:Helping a Million Developers Exit Vim by appleiigs on Tuesday May 23, 2017 @10:20PM (#14407148)
Missing one step. <esc>:q
Re:Helping a Million Developers Exit Vim by dllthomas on Tuesday May 23, 2017 @11:28PM (#14407400)
Actually, the missing step is the <cr> at the end.

The <esc> at the beginning is only necessary if you've already got into insert mode. That said, it'll not do any harm.

Re:Helping a Million Developers Exit Vim by Houshalter on Tuesday May 23, 2017 @11:23PM (#14407381)
So intuitive.
Re:Helping a Million Developers Exit Vim by dllthomas on Tuesday May 23, 2017 @11:30PM (#14407408)
q is only quit when run as a command. In normal mode, it's record.
Re:Helping a Million Developers Exit Vim by equalunique on Tuesday May 23, 2017 @06:44PM (#14406048)
just run vimtutor