|
General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
View Poll Results: Which vi do you use? | |||
original vi | 10 | 19.23% | |
nvi | 4 | 7.69% | |
vile | 0 | 0% | |
elvis | 0 | 0% | |
vim | 34 | 65.38% | |
some other vi clone | 0 | 0% | |
I don't use vi | 4 | 7.69% | |
Voters: 52. You may not vote on this poll |
|
Thread Tools | Display Modes |
|
|||
You're welcome, TerryP.
I've always just used "vi" on FreeBSD, but I wondered about whether "nvi" was installed. /usr/bin has both, but they are the same file size, and diff shows no differences between the files. Are they the same? If so, why not just use a symbolic link and save a bit of disk space? |
|
||||
/usr/src/user.bin/vi/Makefile sets things up to build vi from the desired parts of /usr/src/contrib/nvi, the makefile defines a list of $(LINKS) mapping n(vi/ex/view) to their traditional counter parts, and let's bsd.prog.mk handle creating the hardlinks.
But I don't understand your comment about using a symlink though. Shouldn't a hardlink be more efficient then a symbolic link? A number of things on the system appear to be just hard links, on my OpenBSD 4.3 machine for example, sh, ksh,rksh all have the same inode number and number of links.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Quote:
Yes, this is a small nit. These days I don't really care much about file sizes. It is just contrary to the BSD philosophy. |
|
|||
Quote:
It just so happens that the source code for the original vi has been released under a BSD-like license. You can get it here.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14) |
|
|||
Could you please expand on this?
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14) |
|
|||
Simply that excess bloat is removed. Multiple files containing the same thing is just not what the BSDs do. Maybe they are indeed the same files; I only did simple file sizes, diffs and directory listings.
|
|
||||
A quick look, makes me think that they are all hardlinks:
Code:
Terry@dixie$ uname -a 3:03 FreeBSD dixie.launchmodem.com 7.0-STABLE FreeBSD 7.0-STABLE #0: Thu Jul 17 15:17:58 UTC 2008 root@sall1600.launchmodem.com:/usr/obj/usr/src/sys/VIPER i386 Terry@dixie$ stat -Lx /usr/bin/nvi 3:26 File: "/usr/bin/nvi" Size: 305964 FileType: Regular File Mode: (0555/-r-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ wheel) Device: 0,91 Inode: 6382697 Links: 6 Access: Tue Sep 9 05:44:13 2008 Modify: Thu Jul 17 20:27:57 2008 Change: Thu Jul 17 20:27:58 2008 Terry@dixie$ ls -i1 /usr/bin/n{vi,ex,view} /usr/bin/{vi,ex,view} 3:26 6382697 /usr/bin/ex* 6382697 /usr/bin/nex* 6382697 /usr/bin/nvi* 6382697 /usr/bin/nview* 6382697 /usr/bin/vi* 6382697 /usr/bin/view* Terry@dixie$ 3:27
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Well, earlier you learned something, and now I do. Thanks!
|
|
|||
I started using vim when I first got to *nix world.
But then I noticed that vim did not come by default on a lot OS's and while vi did. And there were also alot of files that the default editor for them would be vi. So I decided it would be more worth it for me if I learned vi instead of vim. |
|
|||
Quote:
To enable it you probably need to set the locale. According to nvi website: Quote:
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14) |
|
|||
I spent the better part of a day trying to cross compile nvi to run on windows. That was a futile effort. I couldn't get it to work nice with configure and the makefile.
elvis and vim both have pre-compiled versions, so I put those on a flash drive to use at school editing files.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14) |
|
|||
You can get nvi for Windows as part of UWin, the Unix-for-Windows package from (the former) Bell Labs. It has many useful tools, including a good ksh implementation. That makes sense, since it is David Korn's project.
|
|
||||
Quote:
And I voted for the original vi!! I voted wrongly then...
__________________
She sells C shells by the seashore. |
|
||||
yes it is nvi, I guess they just didn't see any point in any n* hardlinks.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
I wonder how many other people wrongly voted for vi when they actually use nvi.... cruel world.
|
|
||||
Well beyond DrJ, I don't know any of the others in the poll thus far to say original Vi. But I would hope most people got it right.
And just for the heck of it, doing :version in /usr/bin/vi (nvi) on FreeBSD 7-STABLE: Code:
Version 1.79 (10/23/96) The CSRG, University of California, Berkeley.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
Tags |
nvi, vi, vim |
|
|