From owner-freebsd-questions Mon Jul 30 12:35: 3 2001 Delivered-To: freebsd-questions@freebsd.org Received: from drex.staff.izr.com (drex.staff.izr.com [195.26.38.16]) by hub.freebsd.org (Postfix) with ESMTP id 1F12D37B401 for ; Mon, 30 Jul 2001 12:34:59 -0700 (PDT) (envelope-from mark@drex.staff.izr.com) Received: by drex.staff.izr.com (Postfix, from userid 1001) id 9BE0533799; Mon, 30 Jul 2001 20:34:52 +0100 (BST) Date: Mon, 30 Jul 2001 20:34:52 +0100 From: Mark Drayton To: freebsd-questions@freebsd.org Subject: Re: .vimrc setting Message-ID: <20010730203452.A88189@drex.staff.izr.com> Mail-Followup-To: freebsd-questions@freebsd.org References: <3B65A956.EAF75729@niicommunications.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B65A956.EAF75729@niicommunications.com>; from jason.hunt@niicommunications.com on Mon, Jul 30, 2001 at 01:37:10PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jason Hunt (jason.hunt@niicommunications.com) wrote: > I apoligize if this is a little off topic, but I am sure can point > me in the right direction in a timele fashion with this one.. > > In vim, I have autoidenting set to on: > > set ai > > but when I am in vim, and writing a script (example) > > #!/bin/sh > > if [ -z "$VARIABLE" ] ; then > echo "lame" > > anyway what is happening here is that it is not > tabbing echo over automatically - I know this can > be done, but it seems I mucked up my .vimrc > file. if I closed with fi it would also format > it correct, but it is not doing this now. "set ai" will only tab across the same number of tabs as the previous line. For example, if I type: if [ -z "$VARIABLE" ]; then echo "foo" and hit enter, the cursor will be placed beneath the "e" of echo, ready for me to put more code in the block. "set cindent" will automatically indent C code the way you want, but I don't know whether it'll do other languages. Cheers, -- Mark Drayton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message