5 ms·
I saw the bumper sticker ":w saves" and thought, to myself I wonder how many people "get" that. I suggested a long time ago that vi/vim bind ^C to exit. It cur
by ChuckMcM 9y ago
I saw the bumper sticker ":w saves" and thought, to myself I wonder how many people "get" that.
I suggested a long time ago that vi/vim bind ^C to exit. It currently is equivalent to 'esc' (it puts you into command mode if you aren't there and types the message "type :quit<Enter> to exit Vim". I'd much rather it popped up 'exit vim? y/n?' and the next key would determine if you exited or not.
- sirfz 9y agoThat looks more like emacs behavior though, vim rarely (never?) prompts the user for anything. You enter a command, you get a reaction (either an action like quits vim, or a message indicating something happened) -- which I personally prefer much more than getting annoying prompts.
- ChuckMcM 9y agoI don't disagree. And I like that vim doesn't prompt you a lot, but it is the one corner case where such prompting could be useful.
- spathi_fwiffo 9y agoit already tells you hot to quit when you hit control-c and if you happen to be in edit mode, hitting it twice gets you the message. if people don't notice the "Type :quit<Enter> to exit Vim" message, they also won't see the (Y/N) selection. so, absolutely nothing gained by making this change, except making things more annoying for people who do know how to use vim.
- LoSboccacc 9y agoSpeaking of which, Control-s is much dangerous to neofites
- icc97 9y agoYou get a prompt if you try to exit and you haven't written the buffer to file
- khedoros1 9y agoIt does print a message, but doesn't prompt you for a response. I think that's the distinction that was being made.
- kevhito 9y agoNot in (my) vim you don't. You get: > E37: No write since last change (add ! to override)
- sirfz 9y agoActually you get a prompt when you try to save a file that has been modified in a different session or when you switch to a similarly modified buffer. But those are pretty reasonable and don't happen that often.
- vhost- 9y agoYou can get vim to prompt you to confirm changes with `:%s/foo/bar/gc` where c is "confirm".
- flukus 9y agoEver tried spacemacs? Creating a tab feels like playing 20 questions.
- rodelrod 9y agoI'd vote against that. I use ^C as the best "esc-replacement-without-straying-far-from-the-home-row" that works in every install, every emulator and every international keyboard.
- belovedeagle 9y agoI try hard to train myself that ^[ is ESC, but of course only in situations where jj doesn't work. =)
- Unbeliever69 9y agowhy not use ii?
- belovedeagle 9y agojj is on the home row...
- twic 9y agoBy my count, 60 people get it: https://stackoverflow.com/questions/1019573/save-icon-still-a-floppy-disk/1020633#1020633 https://stackoverflow.com/questions/1019573/save-icon-still-...