News for hackers. Stuff that matters.
Re:Helping a Million Developers Exit Vim by colechristensen on Tuesday May 23, 2017 @01:46PM (#14403358)
Vim has a steep learning curve and making that one thing easier isn't going to make that curve any easier to climb. Powerful tools require documentation and looking up how to quit is the first task of many to use any of vim's power.

Not everything has to be easy to use, some things benefit from not being obvious.

Re:Helping a Million Developers Exit Vim by lucideer on Tuesday May 23, 2017 @01:51PM (#14403411)
I think this is a poor argument. If it's the one singular thing that's frustrating this many users, that's a reason to focus on particular on fixing it somehow. You also need to take into account that most users encountering this problem are not deliberate vim learners: they ended up in vim by accident.

That said, as others have pointed out, the vim developers can't really be blamed here as it's just a very hard problem. There isn't a common convention, and vim already goes above and beyond to try and educate users on how to get out. People ending up on this SO question just seem unwilling to read.

Re:Helping a Million Developers Exit Vim by Crito on Tuesday May 23, 2017 @01:54PM (#14403457)
>they ended up in vim by accident.

Sounds like a distro problem.

Re:Helping a Million Developers Exit Vim by lucideer on Tuesday May 23, 2017 @02:57PM (#14404101)
Technically a distro problem but since most Linuxes I've used default to nano I'm guessing the most common culprit is the msysgit "distro".

macOS is another potential culprit - can't remember the default there.

Re:Helping a Million Developers Exit Vim by recursive on Tuesday May 23, 2017 @02:26PM (#14403805)
I never ended up in vim by accident until I installed git. vim doesn't come with my distro. (windows 10)
Re:Helping a Million Developers Exit Vim by smacktoward on Tuesday May 23, 2017 @01:59PM (#14403509)
There is a common convention, though, which is: don't use modal interfaces, modal interfaces are bad.

The problem vim has is that its UI is entirely organized around modes, which makes the "people are terrible at using modal interfaces" problem a hard one for it to cope with.

Re:Helping a Million Developers Exit Vim by falcolas on Tuesday May 23, 2017 @02:15PM (#14403700)
Modal interfaces are bad; yet it's what differentiates Vim from everything else, and thousands of people actively enjoy using Vim.

Not to mention your OS is full of modal interfaces. "Why can't I type?" "You have a menu open." "Why can't I type when my cursor is over this window?" "You have a different window as your focus." "Why doesn't space pause this YouTube video?" "Because play wasn't the last button clicked." "WHY ALL CAPS?" "Check your capslock key."

Re:Helping a Million Developers Exit Vim by smacktoward on Tuesday May 23, 2017 @02:28PM (#14403818)
> Not to mention your OS is full of modal interfaces. "Why can't I type?" "You have a menu open." "Why can't I type when my cursor is over this window?" "You have a different window as your focus." "Why doesn't space pause this YouTube video?" "Because play wasn't the last button clicked."

None of these are examples of modes, at least not as the term is used in the context of user interfaces. (See https://en.wikipedia.org/wiki/Mode_(computer_interface)#Defi... for more information.) Modes hijack the entire behavior of the application until the user switches out of them. Windows and menus aren't modal unless they block all other input until the user deals with them.

On the other hand your last example, the CAPS LOCK key, actually is modal; once it's engaged, everything you input is going to be capitalized until you disengage it. You will also notice that the CAPS LOCK key is a common source of user problems in tasks where capitalization is significant, like entering passwords; and that for this reason there are frequent calls to remove it from the standard keyboard layout.

Re:Helping a Million Developers Exit Vim by falcolas on Tuesday May 23, 2017 @02:38PM (#14403934)
How is having an open menu that blocks input NOT a mode? Using your arrow keys will move menu items, enter will select menu items, letters will also often switch menu items attempting to find a menu item with that letter, and getting out of it requires additional clicks or hitting escape.

Ditto the multi window scenario. You have to actively change focus between windows (often between windows in the same application), until which time the application doesn't respond as you expect it to.

Another great example: spreadsheets. You're in one of two modes, editing a cell or moving around cells. Often without great feedback of which mode you're in.

Modal interfaces are everywhere.

Re:Helping a Million Developers Exit Vim by Kurtz79 on Tuesday May 23, 2017 @02:06PM (#14403609)
Its use of a modal interface is one of the main reasons that, to this day, attract many developers to VIM.

People "terrible at using modal interfaces" should just use another editor.

The problem might lie in other applications indirectly launching VIM, taking for granted the users' familiarity with it.

Re:Helping a Million Developers Exit Vim by lbebber on Tuesday May 23, 2017 @02:31PM (#14403859)
Modal interfaces are not "bad".

They're often not intuitive, but intuitiveness is not the be-all and end-all of interfaces. It's a trade-off.

Re:Helping a Million Developers Exit Vim by Crito on Tuesday May 23, 2017 @02:05PM (#14403597)
If you took the modal interface away from vim, you wouldn't have vim anymore. If you don't want a modal interface, don't use vim.

You may as well expect Porsche to move the 911's engine to the front.

Re:Helping a Million Developers Exit Vim by smacktoward on Tuesday May 23, 2017 @02:34PM (#14403893)
> If you took the modal interface away from vim, you wouldn't have vim anymore. If you don't want a modal interface, don't use vim.

The vast majority of people don't use vim, so this "solution" has already been widely adopted. (Which in turn causes people who like vim to periodically wonder why more people don't use it.)

The problem comes because there are scenarios where you don't have a choice as to which editor to use; if you're shelling into a server with limited privileges, for instance, vi/vim may be the only even remotely modern editor available. So lots of people find themselves forced to use it, and these are the people for whom the Stack Overflow thread is useful.

Re:Helping a Million Developers Exit Vim by disconnected on Tuesday May 23, 2017 @03:47PM (#14404602)
sigh

Do we need to spoon-feed you people the solution for all of your problems?

Use SSHFS to mount your remote file system, and edit your remote files with your fancy, LOCAL, non-vim editor.

Re:Helping a Million Developers Exit Vim by falcolas on Tuesday May 23, 2017 @02:45PM (#14403997)
> you don't have a choice as to which editor to use

Like... nano? Or pico? All quite broadly available, and easy as dirt to use. You can even use them to work with `visudo`, one of the few times where I could imagine you don't have a choice.

Also, if you can edit it remotely over SSH, you can scp it in two directions and use your own favorite editor (assuming that editor doesn't already have something like network editing already built in; most do).

If you "don't have a choice", you're not looking hard enough.

Re:Helping a Million Developers Exit Vim by khedoros1 on Tuesday May 23, 2017 @05:34PM (#14405577)
> The problem comes because there are scenarios where you don't have a choice as to which editor to use; if you're shelling into a server with limited privileges, for instance, vi/vim may be the only even remotely modern editor available. So lots of people find themselves forced to use it, and these are the people for whom the Stack Overflow thread is useful.

That doesn't sound like a reason to change vim, it sounds like a reason to change the configuration of the server to something saner. pico/nano makes sense to me, if the expected users are the kinds that wouldn't know how to exit vim or emacs.

Re:Helping a Million Developers Exit Vim by dotancohen on Tuesday May 23, 2017 @02:48PM (#14404038)
SSHing into a server implies a basic level of technical competence. The user presumably already knows cd, mv, ls, and family. Why would expecting the user to know a touch of VIM be out of place?

That said, any server admin who for whatever reason allows people to SSH in (shared hosting maybe, university, file sharing) should have nano installed. Anything else is just cruel!:wq

Re:Helping a Million Developers Exit Vim by Gracana on Tuesday May 23, 2017 @03:06PM (#14404203)
> SSHing into a server implies a basic level of technical competence.

They probably learned how to do that in a Stack Overflow thread as well. No competence necessary.

Re:Helping a Million Developers Exit Vim by jjrh on Tuesday May 23, 2017 @02:40PM (#14403949)
I think a extra bar or indicator (that could be removed with a commandline option or conf) with some reminders could be useful.

The problem is you do crontab -e or something similar on a new or foreign system and get into vim and are now stuck.