The vi Editor Mini-Course
|
|
|
Comments (8)
I know that nano ships default on Gentoo, I cant remember if vi does as well, nano being my prefered.
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.
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.
Vi on Slackware exists only as a symlink, by default to Elvis.
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.
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.
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.
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.
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.
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....
I hate Gentoo. The vi issue was a relatively small one. Having to compile all the updates....
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help
Sign up and post (it is free) or Log in and post

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.