From owner-freebsd-questions@FreeBSD.ORG Wed Sep 13 16:52:56 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA88E16A494 for ; Wed, 13 Sep 2006 16:52:56 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id E593243D6E for ; Wed, 13 Sep 2006 16:52:55 +0000 (GMT) (envelope-from kirk@strauser.com) Received: from localhost (localhost [127.0.0.1]) by kanga.honeypot.net (Postfix) with ESMTP id D9A4395988 for ; Wed, 13 Sep 2006 11:52:54 -0500 (CDT) X-Virus-Scanned: amavisd-new at honeypot.net Received: from kanga.honeypot.net ([127.0.0.1]) by localhost (kanga.honeypot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pG6IzooLXvQv for ; Wed, 13 Sep 2006 11:52:51 -0500 (CDT) Received: from kanga.honeypot.net (kanga.honeypot.net [IPv6:2001:470:1f01:224:1::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by kanga.honeypot.net (Postfix) with ESMTP id D9DD29585B for ; Wed, 13 Sep 2006 11:52:51 -0500 (CDT) From: Kirk Strauser To: freebsd-questions@freebsd.org Date: Wed, 13 Sep 2006 11:52:46 -0500 User-Agent: KMail/1.9.3 References: <3ee9ca710609130925i415eca35v483f6ee5421e1125@mail.gmail.com> In-Reply-To: <3ee9ca710609130925i415eca35v483f6ee5421e1125@mail.gmail.com> X-Face: &'; cS03F?rr_w2Qce.d2f7xmwXfcJWDs>}CkpDw.c]ZJJ_)i0Nx Subject: Re: CLI text editor recommendation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2006 16:52:57 -0000 --nextPart1439204.digm1YKR7l Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 13 September 2006 11:25, Andy Greenwood wrote: > I need a CLI text editor I can use over ssh, which does NOT append > newlines to the end of files as I save them. I am using this to edit > PHP files, and my PHP doesn't like newlines outside the last ?>. ee > and vi both do so, I tried nano which also does the same. I haven't > installed emacs to try that yet, since the man page says that it also > does the same thing. Does anyone have any ideas? "vim -b brokenfile.php" should work. Note that something is seriously brok= en=20 with PHP, though, if it can't process text files in the standard format. > Another question: Why do so many text editors have this behavior? Because lines end with end-of-line, and the last line isn't magic. Note th= at=20 almost every text file on your system is this way. Try this: $ cat somefile.txt; echo NEWTEXT If somefile.txt contains "foo", you'd expect to see: foo NEWTEXT However, your broken PHP install insists on files that would result in: fooNEWTEXT which is clearly not the right thing to do. I really don't mean to sound=20 harsh, but the problem really is with PHP and not your text editors. If th= at=20 was a widespread issue, you'd hear about it all over the place and not just= =20 in this one thread. =2D-=20 Kirk Strauser --nextPart1439204.digm1YKR7l Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFCDdi5sRg+Y0CpvERArGdAJwMBHiCmoaVLwfa9hbF5qxHY/4plQCgpaov S+/KgOxm1ZpFxksMBjFJh7A= =kD2n -----END PGP SIGNATURE----- --nextPart1439204.digm1YKR7l--