Subject: newbie trouble with vi
To: NetBSD <port-mac68k@netbsd.org>
From: Chris Bartlett <cb@mythtech.net>
List: port-mac68k
Date: 06/10/2002 14:15:28
ok... I hate to ask this, because it isn't really a mac68k question... 
but I am trying to get mac68k working, so I guess it is half on topic.

I am following the walkthru (Matt's), and am trying to setup my 
networking. Ok, no problems there.

My problem is with vi... it won't let me save new files. Each time I try, 
it tells me "Error: etc/hosts: No such file or directory" (with etc/hosts 
being replaced with whatever file I am trying to do). I tried it as a 
user su'd to root, and directly as root. Both fail (I am correctly setup 
in the group file to su as root, so I don't think it is a permissions 
issue).

I scanned thru the vi man pages, and did a search for how to use vi on 
the web. Everything seemed to indicate I just save, and it will write to 
the file (creating it when it writes). But that doesn't appear to be 
happening.

The weird thing is, I got it to do the resolv.conf file. I'm not sure 
how, as it gave me the same error the first 6 times I tried. But then 
suddenly, it just worked. Now, I WAS using a keyboard that I suspect 
might be flakey, so maybe it either stuck in a character or dropped one, 
and I didn't notice. I have since changed to a different keyboard, one 
that is fine to the best of my knowledge, and I still can't save.

Is there something else I need to do? Some other command besides either 
":w"? All I am doing is starting vi and calling the file ("vi etc/hosts" 
for example). Hitting "i", tying what I want, hitting ESC, typing ":w" 
and then I get that error. ":wq" also does that, so does "ZZ".

I have also tried started my input with "a" instead of "i" to see if 
maybe I had to tell it to physically append data to nothing, but that 
also made no difference.

Thanks for any help someone can give me.

-chris
<http://www.mythtech.net>