From owner-freebsd-questions@FreeBSD.ORG Thu Aug 24 13:19:05 2006 Return-Path: X-Original-To: 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 BFBE116A4E2 for ; Thu, 24 Aug 2006 13:19:05 +0000 (UTC) (envelope-from mjkarki@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id D559143D45 for ; Thu, 24 Aug 2006 13:19:04 +0000 (GMT) (envelope-from mjkarki@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so613857nfc for ; Thu, 24 Aug 2006 06:18:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=bpi+1cZlD48JrjvbKkSDkXtr4nwO8Q8WqaMKaiBMDC8wae8RMAiEDT+wo4G7mr64L6sw/ZwRS+V1rQrUEMVo9+dMRdqiyri42036bFPB33CgZqcIrkEVGG09QtzZkxHjDT90qqZakb29Y2O+Yr8WU0eaGMwDZ+A+U3W+LW7kk+Y= Received: by 10.66.219.11 with SMTP id r11mr931459ugg; Thu, 24 Aug 2006 06:18:59 -0700 (PDT) Received: by 10.67.101.7 with HTTP; Thu, 24 Aug 2006 06:18:59 -0700 (PDT) Message-ID: <1b15366e0608240618j62d41ad3j537f095b2e566ed5@mail.gmail.com> Date: Thu, 24 Aug 2006 16:18:59 +0300 From: "Matti J. Karki" Sender: mjkarki@gmail.com To: "=?ISO-8859-1?Q?Kyrre_Nyg=E5rd?=" In-Reply-To: <7.0.1.0.2.20060824145822.0194fc10@broadpark.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7.0.1.0.2.20060824145822.0194fc10@broadpark.no> X-Google-Sender-Auth: 08b5367b08f8453f Cc: questions@freebsd.org Subject: Re: Code beautifiers, anyone? 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: Thu, 24 Aug 2006 13:19:05 -0000 On 8/24/06, Kyrre Nyg=E5rd wrote: > > I'm looking for the best ways to create a line of code beautification > (reformatting) scripts -- one for C, one for Ruby, one for Bash and > one for web development languages like XHTML, XML, CSS, PHP and Ajax. > Whether as frontline warriors or household maids, they would ensure > proper indentation, linebreaks, spaces, tabs and so forth. > . . . > > I wish to be in full control of my code beautifiers. That is, I wish > to have them as simple and meaningful as possible. Give me an easy > Bash over a complex Ruby any day. > Well, my suggestion to anyone asking this question is that the best thing IMHO is to learn some scripting language with good regular expression support. For example Tcl, Python or Perl. I have to deal with all sorts of source code and I have noticed that - for me - the easiest path is to first study the source code and then create a simple script to beautify the code. It takes less time than trying to find some suitable tool, which may not even product exactly the style I want. -Matti