3 ms·
It does when you open vim without arguments, not when vim opens directly a file, in which case it's confusing to beginners
by kalioz 6y ago
It does when you open vim without arguments, not when vim opens directly a file, in which case it's confusing to beginners
- soraminazuki 6y agoAh yes, I forgot about that. But I'm kind of skeptical that complete beginners would start poking around vim by opening a file directly though.
- werid 6y agowhen it's the default editor and you go to add a cron job...
- soraminazuki 6y agoYou've definitely got a point.
- MAGZine 6y agoDoesn't ctrl/cmd-c remind you of the exit sequence?
- rezonant 6y agoYes it does! But how will they know to hit Ctrl+C? /s
- jabirali 6y agoThe "obvious" reason would be if a person is used to terminals but not vim, as ctrl-c usually kills processes. I think a lot of confusion could be avoided if distributions like Ubuntu, that are commonly used by new Linux users, were to set e.g. EDITOR=nano in their default ~/.bashrc. That way, writing "git commit" from a terminal, typing "v" inside less, etc. would all bring up nano instead of vim by default.
- rezonant 6y ago/s means "sarcasm" :-)
- YeGoblynQueenne 6y agoFrom the git documentation: *core.editor* *By default, Git uses whatever you’ve set as your default text editor via one of the shell environment variables VISUAL or EDITOR, or else falls back to the vi editor to create and edit your commit and tag messages* https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration It seems that many people leave their default editor undefined so git opens vi for commit messages by default. vi tends to be symlinked to vim on many systems so that means they end up in vim (not that it makes a difference, I'm just being pedantic :).
- lordgrenville 6y agoYeah, I think the most common case is git beginners typing `git commit` without the -m flag. This was my first (unwilling) baptism into Vim.
- recursive 6y agoUg yes. This is why I always pass -m to commit, at the risk of losing the containing terminal session to forcible closure. I know quitting it is colon exclamation something or other, but it's always quicker just to start from scratch than to look it up.
- deanclatworthy 6y agoAs a complete vim beginner this is what I did and still do. I have never opened it fresh as I don't know how to then open a file :D
- deleted 6y ago[deleted]
- alpaca128 6y agoVim also writes a help message when Ctrl-C is pressed, in case someone desperately tries to stop it like any other terminal command.