Actually, he's not quite right

Story: The vi Editor Mini-CourseTotal Replies: 7
Author Content
caitlyn

Aug 14, 2009
6:00 PM EDT
A while back I ran into a distro, I forget which, where I typed vi and the filename at the command line and was told that vi didn't exist. That distro had nano loaded by default and no vi. visudo worked but it launched nano. I wish I could remember which distro that was.

I've used vi for years and years and it is standard on MOST forms of *nix, but not all Linux distros as the author claims.
azerthoth

Aug 14, 2009
7:11 PM EDT
I know that nano ships default on Gentoo, I cant remember if vi does as well, nano being my prefered.
Steven_Rosenber

Aug 14, 2009
7:17 PM EDT
Puppy Linux doesn't ship with vi.

And back when I used Puppy, crontab tried to load vi as its editor ... and hence didn't work. Instead, to set up cron jobs, the Puppy developers wanted you to use a graphical application -- the name of which escapes me -- for which there was almost no documentation (as opposed to tons for visudo). I could never get it to work.
gus3

Aug 14, 2009
7:36 PM EDT
Vi on Slackware exists only as a symlink, by default to Elvis.
Steven_Rosenber

Aug 14, 2009
7:42 PM EDT
The whole "what really happens when I type 'vi' at the console" thing is confusing.

My understanding:

Most BSDs symlink vi to nvi, the "bug for bug" copy of the original vi

Most Linux distros symlink vi to vim, an editor that looks and acts just like vi but had additional features

Of course in those BSDs, you are free to install vim, and in the Linuxes you can install nvi ...

So depending on how you feel about all things vi, it's the best of both worlds (or the worst of times).

I personally had a nano fascination, but what brought me back to vi was the way text stays on the screen even if you don't wrap it. If you don't wrap text in nano, you can't see it all, but if you do wrap it, those linefeeds stay in the file. ... So I prefer the not-wrapped vi-type way text is displayed on the screen.
caitlyn

Aug 14, 2009
8:09 PM EDT
vim, nvi, and elvis are all vi compatible and have all the vi functionality plus some of their own added on top. nano, OTOH, is not vi compatible.

What I should have said was that the distro in question didn't have vi or anything compatible with vi. You guys are keeping me honest.
hkwint

Aug 16, 2009
5:44 PM EDT
Quoting:I know that nano ships default on Gentoo, I cant remember if vi does as well


Gentoo requires virtual/editor to be installed, and in the ebuild, "nano" is mentioned before vim. If you delete 'nano' from the ebuild file, 'system' will be built with 'vim' instead of 'nano'. So you're correct, Gentoo doesn't come with vim by default.
caitlyn

Aug 17, 2009
12:49 AM EDT
Hans, thank you. I did some work for AIG in 2004-05 and some of their sysadmins had installed Gentoo, much to management's chagrin. I had to support it. It was, indeed, Gentoo that had no vi.

I hate Gentoo. The vi issue was a relatively small one. Having to compile all the updates....

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!