CLI text editor recommendation

Norberto Meijome freebsd at meijome.net
Wed Sep 13 10:10:21 PDT 2006


On Wed, 13 Sep 2006 17:49:20 +0100
Alex Zbyslaw <xfb52 at dial.pipex.com> wrote:

> I'm surprised at PHP barfing on "extra" newlines, but then I've never 
> used it.
PHP does not barf at the extra lines. what could be happening is that the file
in question being edited (include_me.php) is included by some other PHP script
(some_script.php). If some_script.php loads include_me.php before issuing it's
HTTP headers, then the new lines (or any non-php-code text in include_me.php
will be sent out ot the client , BEFORE the headers, which , depending on your
error / warning settings, will make php complain, and will defnitely prevent
the intended action of the HTTP headers from happening properly.

back to the subject, i doubt that vi 'adds' a new line... i've used vi for
years (and yes, many times editing php scripts over ssh) and it doesnt save any
more lines than those already present... 
maybe you need to remove DOS ^M ? ( try converters/unix2dos ) - those are far
more likely to cause headaches on a cross platform environment.

_________________________
{Beto|Norberto|Numard} Meijome

"Software is like sex, its better when its free"
   Linus Torvalds

I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.


More information about the freebsd-questions mailing list