[nycbug-talk] odd vi question

Aidan Cully aidan at panix.com
Mon Apr 5 07:29:56 EDT 2010


On Sun, Apr 04, 2010 at 02:44:04PM, Charles Sprickman said:
> Hi all,
>
> Using the stock FreeBSD vi (which is nvi), I'm finding some odd behavior  
> that I've not seen before when editing some html files with spaces in  
> their names.
>
> I open the file, either by cutting and pasting the filename or using  
> tab-completion, and it opens with no errors.  I make a few changes and  
> then write-quit (:wq).  When doing that on this set of html files, I  
> always get this prompt:
>
> 42/1255022332 Distribution Center_Converted.html: 46312 lines,
> 2854816 characters.
> Press any key to continue:
>
> It's the filename, a summary of lines/characters in the file and then a  
> propmpt to continue.  Pressing any key continues closing the file with no 
> errors.
>
> I've never seen this before and can't reproduce it with other files with  
> spaces in their names.  What am I not seeing that's unique about these  
> files?  What is the purpose of this prompt?

I don't think this has to do with spaces, but with the length of the
status line when the file is written.  I've only noticed the "press any
key" prompt when the write status line (in your case, the text
    42/1255022332 Distribution Center_Converted.html: 46312 lines,
    2854816 characters.
) has to be broken up across more than one line.  I just experimented
with a filename that was the same width as my console window, and got
the same behavior you just described.

HTH
Aidan



More information about the talk mailing list