Date: Mon, 30 Jul 2001 20:34:52 +0100 From: Mark Drayton <mark.drayton@izr.com> To: freebsd-questions@freebsd.org Subject: Re: .vimrc setting Message-ID: <20010730203452.A88189@drex.staff.izr.com> 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
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 <tab> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010730203452.A88189>
