9 ms·
I'm somewhat amazed but mostly amused that the Vim developers care so little about user experience that they continue to ignore that people have trouble with ex
by gogopuppygogo 9y ago
I'm somewhat amazed but mostly amused that the Vim developers care so little about user experience that they continue to ignore that people have trouble with exiting their tool and refuse to adapt to a more expected convention for exiting it.
- vopi 9y agoIt literally everytime you boot the first screen tells you how to quit and get help. So..read the screen that comes up Everytime? If you try Ctrl c it tells you it's :q.
- jayflux 9y ago> developers are often dropped into Vim from a git command or another situation where they didn’t expect to be, and they run into it infrequently enough to forget how they solved it last time. So the first screen doesn't help in this situation The sort of developers who get stuck in Vim are not the ones who are using it intentionally
- signal11 9y agoHitting Ctrl+C still works, it tells you to type ":quit<Enter>".
- masklinn 9y agoWhy doesn't it just quit? That's as stupid as Python's >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit The software knows perfectly well what I'm trying to do FFS.
- Macha 9y agoSo it actually doesn't, it's basically just a hack around the fact that the repl is basically: while True: print(str(eval(input()))) Case in point: >>> x = str(quit) >>> x 'Use quit() or Ctrl-Z plus Return to exit' I suppose you could implement quit.__str__ as sys.exit(0), if you really wanted to avoid this problem.
- masklinn 9y ago> So it actually doesn't It does, it just does not care. > it's basically just a hack around the fact that the repl is basically: I know what a REPL is. Here's an idea: it's not difficult to add an exit special case to the REPL. > Case in point: Case in point: the developers added a "help text" to tell users to go fuck themselves, knowing exactly what users wanted to do and refusing to do it. quit's repr didn't appear by magic, it was put there, knowingly, by people who understood exactly what they were doing.
- monknomo 9y agoHumane programming is something I wish compiler and language builders would do more of
- marvin 9y agoApproximately 50% of the contributors in this thread argue actively against it, so I wouldn't hold my breath ;)
- monknomo 9y agoThat was not lost on me. They're wrong, and kinda mean TBH, but someday someone will make a pretty good language, with a really helpful compiler/interpreter and will have the viral-fu to get it in use
- pishpash 9y agoIt's insidiously more malevolent than that, considering how much productivity is wasted.
- sbmassey 9y agoquit is not a piece of repl functionality, it is a python function that will exit the repl when called, with a string representation that gives that message. If I set quit = 1, or if I define my own quit() function, I don't want to have to be continually fighting the repl in order to inspect its value.
- StavrosK 9y agoBecause it's an editor, and if it just quit on me every time I mistyped Ctrl-C just because you can't be bothered to type the right command, I would be quite angry.
- scrollaway 9y agoMy GUI editors quit on me every time I mistype Ctrl+Q. I don't really see the difference.
- root_axis 9y agoRight... I think the point is that this behavior is not preferable.
- chipotle_coyote 9y agoI would think that in both the ^Q and ^C case, the editor in question is capable of prompting "Really exit? (Y/n)" or something to that effect.
- bdamm 9y agoSince I switch between Mac OS X, Windows, and Linux hosts, accidentally typing ctrl-c when I meant to type cmd-c (copy outside of Terminal) isn't such an infrequent error. I'm thankful that ctrl-c isn't mapped to quit without saving.
- Piskvorrr 9y agoI do consider that a misfeature, especially since Ctrl+W and Ctrl+A are one key away and often carry commonly-used commands.
- khedoros1 9y agoWell, and my GUI editors don't respond to single-letter commands. It would violate my expectations of their UIs if they did. Similarly, in vim, I expect ctrl+q to send an XON signal to my terminal emulator...not to quit my editor. They're different programs with different UI conventions. I don't expect them to act the same. And I especially don't expect vim to change, after having 25 years of its own precedent and an additional 16 through vi.
- dllthomas 9y agoIn both cases, the program doesn't know what you're trying to do. It knows what you're probably trying to do. That's not enough. In both cases, this is because there's a race condition: If you run a command and decide you want to kill it, you use ctrl-c. If the command finishes between you deciding to kill the command and the signal being sent, the "container" process (vim or python) receives the ctrl-c. If it always assumes "what you want" is to exit, you've maybe lost work - edits made or variables populated. Avoiding that is definitely the right call!
- Asooka 9y agoPlenty of good reasons for ^C not to quit, mostly having to do with the rest of the Vim interface. Off the top of my head, first ^C is for cancelling actions, second ^C is very close to ^V, which is used for block-select, and very close to ^X, which is used for auto-completion, and very close to ^D, which is page-down, and quitting by mistake would be super frustrating. I think in this case vi's authors (and by extension vim's author) have picked the right choice of catering to the actual users, rather than being friendly to people who run the editor by mistake. At least they try to tell you "type :quit and press enter to exit".
- theandrewbailey 9y agoIf I expect Ctrl+C to quit immediately, and it doesn't quit immediately, that is not functionality that works.
- manyxcxi 9y agoWhat if you're normally a Windows user and you pressed CTRL+C trying to copy something out of the terminal? You haven't written to disk in a while, and then poof. Muscle memory can be a real pain some times.
- adambyrtek 9y agoYou might expect it to quit immediately, but most Vim users don't (for example I have a habit of using Ctrl-C to exit insert mode). When you travel to a foreign country you shouldn't expect everybody to speak your language.
- noir_lord 9y agoI got dropped into vim the other day (fortunately I used to be a vim user) unexpectedly. Had switched from Ubuntu to Fedora and it turns out that vim was the default git editor not nano (until I switched it anyway).
- dsp1234 9y agodev: That just typed ':q' into the text area me: Hit escape first, then :q dev: Oh, then why doesn't say escape then :q me: welp
- eridius 9y agoCute, but no. When you enter insert mode, the "welcome screen" disappears. So if you can see the instruction telling you to type ':quit', then typing :quit will work.
- dsp1234 9y agoFTA, https://zgab33vy595fw5zq-zippykid.netdna-ssl.com/wp-content/uploads/2017/05/exitvim-1024x455.png https://zgab33vy595fw5zq-zippykid.netdna-ssl.com/wp-content/... It happens because people don't what they are doing. You assume that they hit ctrl+c, then immediately type :quit, but if they did, then they wouldn't be Googling it. They did something between trying to exit and quit that got them into a different mode.
- FreeFull 9y agoPerhaps they miss the : Without it, you end up recording a macro and going into insert mode.
- eridius 9y agoI'm not assuming they're hitting Ctrl+C. What I'm saying is the screen that says VIM - Vi IMproved version 8.0.567 by Bram Moolenaar et al. Vim is open source and freely distributable Sponsor Vim development! type :help sponsor<Enter> for information type :q<Enter> to exit type :help<Enter> or <F1> for on-line help type :help macvim<Enter> for MacVim help disappears as soon as you enter insert mode (or really interact with Vim at all). If you're in insert mode, you don't see this. So if you see this, typing :quit will work.
- a3n 9y agovim myfile.txt opens myfile.txt, and literally does not show the splash screen.
- masklinn 9y agoAnd worse vim is often the default EDITOR or software's fallback in case no EDITOR is set, so you get dropped into a vim edition buffer seemingly randomly.
- fishywang 9y agoI'm pretty sure that I've never seen any OS/Linux distribution set default EDITOR to vim. If EDITOR is set to vim, then someone must intentionally did that.
- theandrewbailey 9y agoThat's the point. That behavior is contrary to the expectation. Ctrl+C should not display a message: Ctrl+C should quit immediately.
- bryanlarsen 9y agoOn many editors ctrl-c is the copy key. Not a good key to exit on...
- kpil 9y agoIt's the other way around - mapping copy to ctrl-c was a bit stupid...
- slrz 9y agoYep. Apple got this one right with the Cmd key. Much saner than the context-dependent hijacking of the control key with its long-established conventional usage.
- bryanlarsen 9y agoVery true, but that argument was lost over 20 years ago.
- chrisweekly 9y agoCTL-C, or CMD-C?
- brewdad 9y agoComing from the Windows world, I am happy that Ctrl+C doesn't make assumptions and quit. Imagine attempting to copy something and having your file close without warning.
- ygra 9y agoYou can intercept Ctrl+C on Windows just as well and do nothing, or something different than quitting.
- bdamm 9y agoThe GUI version can be exited from in the same way as any other GUI application. If run from the command line, there is no standard way to exit (nano? emacs? joe?)
- colechristensen 9y agoVim 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.
- lucideer 9y agoI 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.
- Crito 9y ago>they ended up in vim by accident. Sounds like a distro problem.
- recursive 9y agoI never ended up in vim by accident until I installed git. vim doesn't come with my distro. (windows 10)
- lucideer 9y agoTechnically 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.
- smacktoward 9y agoThere 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.
- placeybordeaux 9y ago> refuse to adapt to a more expected convention for exiting it. Which would be?
- Symbiote 9y agoControl C.
- Crito 9y agoWhat interactive terminal programs exit using ^C? Nano doesn't, top doesn't. There is no standard for interactive terminal programs. Furthermore ^C doesn't fit with the rest of vim's control schema, so you wouldn't really be doing anybody any favors in the long run.
- disconnected 9y agoFunnily enough, emacs doesn't either.
- tuco86 9y agoWasn't Ctrl-C used for something in vim ;)
- falcolas 9y agoTry that in less. Or Emacs. Or Nano. Or Pico. Or ed. Doesn't work there, either. Most of those don't even offer advice on how to exit when you hit that combo, do they? So, how is Ctrl-C the right answer then?
- Crito 9y agoWhy solve a "problem" that no actual user of the software has? It's not an iphone, it isn't meant for use by the general public. Use nano if that's what you want. There's no reason to fuck up vim for people who actually use it to help the people who don't.
- smt88 9y agoMany of us get dropped into vim by accident.
- Crito 9y agoThat's your distro's problem, not vim's. There is no reason to fuck up vim just because distros are poorly configured.
- pbhjpbhj 9y agoPerhaps an alternative is a "first run" mode which could do something like ask "did you intend to open vim? Y/N (answering N will close vim)". If you answer Y then you get a lesson in closing vim, if N then you always get the "first-run" mode until you answer Y? The impact on vim users would be virtually nil whilst also respecting that non-vim users are caused problems. Who is most to blame is not usually the most helpful focus.
- smt88 9y agoYou're changing the subject. You said: > that no actual user of the software has? It's not an iphone, it isn't meant for use by the general public. You're obviously wrong. Millions of users of the software have that problem. It is used by the general public. It's irrelevant whether they intended to be users of the software or not. No one decides on a distro based on the default text editor, and some people are still learning how to use nix and won't know to change it right away. Plus, from vim.org: > It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files.* Sounds like vim is for use by the general public to me. It just isn't very good at usability.
- BugsJustFindMe 9y agoOne could easily relate this to burkaman's comment in this thread on the most viewed question (how to undo a git commit). You could say "I'm somewhat amazed but mostly amused that the Git developers care so little about user experience that they continue to ignore that people have trouble with the fact that git command line arguments are an incomprehensible morass of inconsistencies un-righted by overly verbose walls of documentation." What the two have in common, of course, is that despite being exceptionally beginner-hostile, the tools are massively popular for other reasons. Namely, they are powerful, relatively fast, and they also strongly benefit from cult of personality and network effects.
- jasonkostempski 9y agoFor gvim, the X works as expected but what would be a more expected convention from exiting a cl text editor be? Most long running cli tools people are used to are read only and have just a few keys for different views and they tend to use 'q' or 'Esc', any single key isn't an option for a text editor. If they're in normal mode, Ctrl-c does give the message "Type :quit<Enter> to exit Vim" but I'm guessing most people don't notice it or think the ':' isn't part of the what they have to type because they don't now commands start with it, I would change it to "Type ':q<Enter>' to exit Vim". But people tend to accidentally leave normal mode by trying to type other things, so the Ctrl-C message isn't always helpful.
- eikenberry 9y agoThe Neovim fork takes UX seriously and have changed many of the defaults with this in mind.
- draw_down 9y agoBingo.
- emodendroket 9y agoWhat about everyone who's been using it for decades and expects it to work that way?
- disconnected 9y agoSo much whining on this thread... Want to quit vim? How's about: 1- Hit ctrl-z 2- Type "kill -9 %" 3- Hit enter Result: dead vim. Heck, dead anything that was previously on the foreground. This works with emacs, vi, nano, and, I guess pretty much everything, since ctrl-z is captured by the shell and never gets sent to the application (I think).
- falcolas 9y agoI'm guessing the multitasking capabilities of the shell are not well known to those who don't know vim. Nor how to open a separate tab session, do a `ps`, and kill that. It should be shell 101, but it's not.
- belovedeagle 9y agoNo, applications can and do trap either ^z or the signal it generates (not sure which). I'm a vi user [0] but I'm pretty sure emacs requires ^z^z to STOP. [0] autocorrect lol of the day: "I'm a vi[rgin]"
- khedoros1 9y agoemacs stops on a single ^z. You can trap it based on SIGTSTP though (Terminal SToP, a distinct signal from SIGSTOP, which I don't think can be trapped).
- belovedeagle 9y agoI guess one of my plugins steals ^Z; maybe evil-mode itself.
- JdeBP 9y agoActually, no. vim runs with the terminal in non-canonical input mode. Control+Z results in a SUB character being sent to vim. vim, in turn, knows to suspend itself when it receives that character (in visual or normal mode).
- njharman 9y agoTroll, don't feed it.
- lenzm 9y agoI think the real problem is that vim is the default editor or people are writing tutorials and using vim. Asking vim devs to break the whole raison d'etre (modality) is kind of ridiculous.
- kpil 9y agoI don't particularly like vi, but as a intermittent user for 20 years, I don't like it to be changed just because a few junior front end developers (ok a million) think it's hard to use. The default editor in distros could be set to nano or some other reasonably 'windowsy' editor instead. Those who want vi or emacs know how to fix it anyway...
- peatmoss 9y agoOr as an emacs user, we deal with a lot of weirdness by modern standards. But when someone asks for a random change, it's more a matter of, "sure, knock yourself out."
- theonemind 9y agoAs a sysadmin, this drives me crazy. I log into a lot of systems I didn't set up, and then I press the key at the command prompt to bring it up in an editor, or invoke something that uses an interactive editor, and its nano. I have to exit it, export EDITOR=vi and do it again. I don't even like vi as a standard editor. I just expect the system default of vi, and nano is painfully underpowered. I'd even adapt to it running emacs, but it's like getting a nerf hammer every time you need a real one when the system pulls up nano by default.
- colordrops 9y agoVIM works in a certain way. Once you understand it, the mechanism for exiting fits in just with the rest of the patterns. Why should they create a special case for exiting versus other operations? "Why is it so hard to search? Use ctrl-f instead of /" "Why is it so hard to cut and paste?" "why is it so hard to move the cursor?" You'd have a different editor if you changed the keybindings. Vim's defining feature is the keybinding grammar, so it would no longer be Vim if you changed it.
- cryptonector 9y agovi's defining characteristic, which vim inherits, is that it is _modal_. That means that it has modes, like input mode (where what you type is added to the file), and command mode (where what you type are commands to the editor). Modal editing is fantastic: it means you don't need a meta key, or multiple modifier key combinations to do things (for which your wrists will thank you!). It frees up keybindings for different purposes, which is partly how modal editing ends up needing fewer modifier key combinations. Best thing in editing technology yet.
- JdeBP 9y agoIt is not a characteristic peculiar to vim/vi. There have been several modal text editors over the years. TEDIT, for just one example. * http://www.texteditors.org/cgi-bin/wiki.pl?T http://www.texteditors.org/cgi-bin/wiki.pl?T
- jjrh 9y ago> "refuse to adapt to a more expected convention for exiting it." so forget about all the people who have used vi for decades? It might make sense to have a bar at the bottom or top with some of the very very basic commands a new user may need (like quitting) that more experienced users can turn off with a command line option or a config value. (specifically if say you do crontab -e or something similar and had no intention of using vim and are now stuck)
- smoe 9y agoIn my opinion the problem is more, that console beginners are told that CTRL+C is a magical bullet that will save them from any obstacles they might encounter in the depths of the cli. It's not like other editors behave much differently than vim. Try for example to get out of an "git log" with CTRL-C. Or figure out what the key combo ^x in nano means as a novice.
- exabrial 9y agoActually, I would propose the UI for vim is very self-consistent.
- dotancohen 9y agoVIM is pretty much written by one guy, and like Linus he remains consistent in what his creation's user experience should be. VIM is not meant to be easy to learn, it is meant to be easy to use one you've invested in learning it. VIM is a bad default editor for that reason. But don't blame VIM for being what it is. Rather convince your distro or whatever to set nano as the default, easy to learn, editor.
- egwynn 9y agoIt’s tremendously important to realize that Vim comes from a VERY long line of text processing utilities that stretches back over a half a century. Vim is the result of constant iteration on a set of design ideas and conventions that predates it. `Q` for `Quit` is one of the oldest Vim commands, tracing its roots all the way back to the `QED` editor of the 1960s[1]. Changing it now would be foolish. [1] http://wayback.archive-it.org/all/20150203071645/http://cm.bell-labs.com/cm/cs/who/dmr/qedman.pdf http://wayback.archive-it.org/all/20150203071645/http://cm.b...
- pishpash 9y agoWhile I love vim, your argument holds no water. By your argument, it's foolish to change anything at any time, because everything traces its roots back to "something."
- camgunz 9y agoIt's maybe impossible to create a tool that's relatively small, intuitive, and for experts. Vim is relatively small and for experts. There's kind of a trend of tools that are bright and shiny, but not actually that good at their main purpose. You hit a plateau. We don't need more of these, we need more tools that are bold enough to be powerful, even if they're at first hard to learn.
- YeGoblynQueenne 9y agoVim is a modal [1] editor that runs in a console. From those two points onwards you're already a few orders of semantic magnitude away from "more expected convention(s)" so there's really no point trying to fit it into a context it was never meant to fit in the first place. ____________ [1] As in command and edit modes.
- pishpash 9y ago"You can check out any time you like but you can never leave."
- afarrell 9y agothe experience of trying to get up-to-speed with the original vim codebase in order to contribute to it is apparently quite awful. So bad that a bunch of folks started neovim. Anyone with the frustration tolerance to go through that gauntlet is unlikely to be very new-user-UX focused.