From owner-freebsd-questions Mon Jul 30 14:18:46 2001 Delivered-To: freebsd-questions@freebsd.org Received: from rhosgobel.none (kabel203069.kabel.utwente.nl [130.89.203.69]) by hub.freebsd.org (Postfix) with ESMTP id 403EB37B401 for ; Mon, 30 Jul 2001 14:18:41 -0700 (PDT) (envelope-from r.j.s@gmx.net) Received: (from rjs@localhost) by rhosgobel.none (8.11.3/8.11.3) id f6ULIWb01105; Mon, 30 Jul 2001 23:18:32 +0200 (CEST) (envelope-from r.j.s@gmx.net) X-Authentication-Warning: rhosgobel.none: rjs set sender to r.j.s@gmx.net using -f Date: Mon, 30 Jul 2001 23:18:32 +0200 From: Rogier Steehouder To: Jason Hunt Cc: freebsd-questions@freebsd.org Subject: Re: [FBSD-Q] .vimrc setting Message-ID: <20010730231832.A1078@rhosgobel.net> Mail-Followup-To: Rogier Steehouder , Jason Hunt , 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 On Mon, Jul 30, 2001 at 01:37:10PM -0500, Jason Hunt wrote: > greetings, > > 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. > > Anyone? Thanks This is correct behaviour. According to vim's help the ai option makes it copy the indent of a previous line. So if you indent a line and press enter, the next line is indented automatically. This function does no syntax checking, it just keeps the current indentation. Maybe there is something in the syntax files that can do this (aside from syntax highlighting). Anyway, I prefer to do my own indenting of source code. (2, 4 spaces, tabs, put '{' on new lines or at eol... lots of room for personal preference). with kind regards, Rogier Steehouder -- ___ _ -O_\ // | / Rogier Steehouder //\ / \ rjs@gmx.net // \ <---------------------- 90m ----------------------> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message