Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!itsgw!steinmetz!crdgw1!crdgw1.ge.com!barnett From: barnett@crdgw1.crd.ge.com (Bruce Barnett) Newsgroups: comp.misc,comp.editors Subject: Re: UNIX needs a real text editor Message-ID: <62@crdgw1.crd.ge.com> Date: 24 Mar 89 04:00:47 GMT References: <222@imspw6.UUCP> <252@torch.UUCP> <2112@mister-curious.sw.mcc.com> <743@stag.UUCP> <2125@mister-curious.sw.mcc.com> Sender: news@crdgw1.crd.ge.com Reply-To: barnett@crdgw1.crd.ge.com (Bruce Barnett) Followup-To: comp.misc Organization: GE Corp. R & D, Schenectady, NY Lines: 28 In-reply-to: loo@mister-curious.sw.mcc.com (Joel Loo) Xref: utzoo comp.misc:5624 comp.editors:581 In article <2125@mister-curious.sw.mcc.com>, loo@mister-curious (Joel Loo) writes: >The important auto-indentation feature (for C and Lisp) are lacking in vi. >(Or is there a unix tool to do that?) I am not sure what your exact question is, but you can set autoindent, and when you indent a line, the next line is indented the same level. The next tab indents two levels. There is a key to undent. (My vi is rusty) You can run indent on a portion of a file while in vi. You could also define an electric VI macro, (which I defined to be a function key), that would insert a '{' go to next line insert a '}' go back a line indent one level go into append mode. You could define an electric IF, etc. I just used the auto-indent on the electric '{'. -- Bruce G. Barnett a.k.a. uunet!steinmetz!barnett,