From owner-freebsd-questions@FreeBSD.ORG Wed Sep 13 16:49:33 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 AA1C716A415 for ; Wed, 13 Sep 2006 16:49:33 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out2.blueyonder.co.uk (smtp-out2.blueyonder.co.uk [195.188.213.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA5CA43D67 for ; Wed, 13 Sep 2006 16:49:23 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [172.23.170.147] (helo=anti-virus03-10) by smtp-out2.blueyonder.co.uk with smtp (Exim 4.52) id 1GNXvO-0001fc-CJ; Wed, 13 Sep 2006 17:49:22 +0100 Received: from [82.41.35.166] (helo=[192.168.0.2]) by asmtp-out6.blueyonder.co.uk with esmtp (Exim 4.52) id 1GNXvN-0006xH-La; Wed, 13 Sep 2006 17:49:21 +0100 Message-ID: <45083690.80904@dial.pipex.com> Date: Wed, 13 Sep 2006 17:49:20 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.13) Gecko/20060515 X-Accept-Language: en MIME-Version: 1.0 To: Andy Greenwood References: <3ee9ca710609130925i415eca35v483f6ee5421e1125@mail.gmail.com> In-Reply-To: <3ee9ca710609130925i415eca35v483f6ee5421e1125@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions 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:49:33 -0000 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? Emacs most certainly can save files without newlines. I don't see any option in my .emacs to force this behaviour so assume it works out of the box, nor can I find any reference in the man page which says it does add newlines. OTOH, emacs may be overkill if you don't already use it. I would have thought vi would have an option to stop this happening, but don't see one. I'm surprised at PHP barfing on "extra" newlines, but then I've never used it. --Alex