6 ms·
> Famous example: trying to exit vi To be fair, this has been fixed a long time ago. At least Vim (which is the Vi installed on most systems) shows the followi
by vog 10y ago
> Famous example: trying to exit vi
To be fair, this has been fixed a long time ago. At least Vim (which is the Vi installed on most systems) shows the following message on startup:
~ VIM - Vi IMproved
~
~ version 7.4.1829
~ by Bram Moolenaar et al.
~ [...]
~ Vim is open source and freely distributable
~
~ Help poor children in Uganda!
~ type :help iccf<Enter> for information
~
~ type :q<Enter> to exit
~ type :help<Enter> or <F1> for on-line help
~ type :help version7<Enter> for version info
On the other hand, it doesn't show this message when you call "vi" with a filename. But at least a beginner running "vi" for the first time should be taken care by this.
- ygra 10y agoSomeone unfamiliar might just be dumped into vi because some other program thought it'd be great to open a text editor, e.g. for a commit message. You're unlikely to run vi intentionally unless you also know you want to run vi and how to exit, I guess.
- 013 10y agoPrograms that put you into Vi, /should/ be calling $EDITOR, if $EDITOR is to to Vi(m), you should know how to use it. Also, if you ^C in Vi, you get the message: Type :quit<Enter> to exit Vim
- palunon 10y agoAnd what if $EDITOR is not set ? Vi is the standard POSIX editor, calling it makes sense.
- JdeBP 10y agoActually, defaulting from $VISUAL to vi and from $EDITOR to ex (or ed) is what -- strictly speaking -- makes sense. Remember what the difference between $VISUAL and $EDITOR was intended to be. There's a whole range of places in Unix where there was, and even still is, a distinction between a line editor and a full screen editor. Consider, for just one example, the ~v and ~e commands in BSD Mail. Now enjoy the discussion at https://news.ycombinator.com/item?id=13113556 https://news.ycombinator.com/item?id=13113556 .
- deleted 10y ago[deleted]
- marcosdumay 10y agoI do think distros should change their default $EDITOR to nano.
- chungy 10y agoDebian has done exactly that, years ago. It tends to annoy me, but it's easy enough to change :)
- tim333 10y agoYeah happened to me. It's probably standard for anyone trying to learn GIT.
- return0 10y agoto be fair thats not enough either. someone might accidentally have pressed 'a' , and now good luck understanding how to get out of it without having a crash course on vim
- madeofpalk 10y agoActually I found the colon 'syntax' at the beginning of the command to be quite confusing - I wasn't aware that youre supposed to literally type shift + semicolon. That's completely unintuitive compared to 'regular' shortcuts you see in nano like ctrl + c.
- crisnoble 10y agoI consider myself a major vim beginner, only using it for commit messages, very light file creations, and checking out config settings files when sshed into a server. I have never seen this screen.