3 ms·
Someone 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 unlike
by ygra 10y ago
Someone 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.