Date: Mon, 30 Jul 2001 23:18:32 +0200 From: Rogier Steehouder <r.j.s@gmx.net> To: Jason Hunt <jason.hunt@niicommunications.com> Cc: freebsd-questions@freebsd.org Subject: Re: [FBSD-Q] .vimrc setting Message-ID: <20010730231832.A1078@rhosgobel.net> In-Reply-To: <3B65A956.EAF75729@niicommunications.com>; from jason.hunt@niicommunications.com on Mon, Jul 30, 2001 at 01:37:10PM -0500 References: <3B65A956.EAF75729@niicommunications.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010730231832.A1078>