> _ 

c u t u p @ c u t u p . o r g


[osx traditional vi] last modified: 03/25/2007 02:04 pm

Installing Traditional vi for OS X

At work, I've been using vi a lot. Not vim, not even nvi, but traditional, old, vi. My boss loves vi and he's uninterested in and gripes about vim, and even though i installed vim on our SCO box, its not on any of the remote boxes.

Surprisingly, over time I've come to like some things about regular vi, (many) warts and all. For one, it has barely any configurability, which means it tends to do things one (known) way - I had to tinker a lot with vim to get it where I don't accidentally bork up files my boss edited. It's fun to work around some of its limitations even.

Traditional vi is hard to find on modern systems, for good reason. It chokes on (not even very) long lines, can't handle big files, doesn't refresh the screen right sometimes (^L is my friend), and has exactly one undo. If you cut a line, and you hit o instead of p, you just lost your paste buffer. But it's nice to know that a very traditional clone remains available. I don't know barely anything about compiling things, but I was able to compile it on OS X by doing this:

cd ex-o50325
   (edit the INSTALL line to point to /usr/bin/install)
   (comment in the TERMLIB  = termlib line and uncomment #TERMLIB   = ncurses)
make install

it put stuff in /usr/local/ which is near the beginning of my path, and calls itself ex and vi, and since I want to probably use vim by default still, i changed the names of the bins, man pages, and links to o<whatever>. There's probably a way to do that in the MAKEFILE, but I don't know what I'm doing in there.

[osx backup asr] last modified: 03/25/2007 02:04 pm

I do this to backup:

Last login: Sat Oct  7 16:03:05 on ttyp2
    |/ | 
    |/           welcome to 31d1 

31d1:~ 31d1$ sudo time asr --source / --target /Volumes/31d1BAK --erase --verbose
        Validating target...done
        Validating source...done

        Erase contents of /dev/disk1s3 (/Volumes/31d1BAK)? [ny]: y
        Erasing target device /dev/disk1s3...done
        Validating sizes...done
        Copying "/" (/dev/disk0s3) to "/Volumes/Macintosh HD 1" (/dev/disk1s3)...
    11354.02 real       111.39 user      2010.97 sys
31d1:~ 31d1$

Advantage; it's one step, it's bootable, it's reversible, you don't have to worry about all that apple resource forks shit.

Problem; it's not incremental, it takes 3 hrs 9 minutes and 14 seconds to hours to back up my 80 gig drive.

[cpan osx] last modified: 03/25/2007 02:02 pm

Since I got a Mac over a year ago, CPAN has steadfastly refused to really work. It would hang on

Fetching with LWP:

and then timeout after a while and do the same thing with Net::FTP and eventually it would try to use some method that works (which is how I managed to get LWP installed - by letting CPAN run overnight) and it would do this for every file it needed to get. Re-running config did nothing to help.

Every once in a while I'd google all over the place trying to figure out the problem, and it was always no dice. And people I'd talk to with my same setup uniformly told me they had no problems, or that CPAN sucks and they just download the modules over http and roll them themselves.

Well finally for the umpteenth time there's something I need from CPAN, and it's not working for the umpteenth time, and I'm googling about for the umpteeenth time, and I come across a page that notes that Net::FTP uses active FTP by default and that setting

export FTP_PASSIVE=1

is what you need to do if you don't want your firewall screwing things up, and darned if i didn't throw that in my .bashrc and LWP downloads that damn mailrc in about a second, and suddenly I HAVE CPAN on my frikking powerbook!

[All Posts] [top]