Article View: comp.editors
Article #2835Altering indentation of C code in vi
From: Geoff Clare
Date: Tue, 18 Jun 1991 13:24
Date: Tue, 18 Jun 1991 13:24
15 lines
1139 bytes
1139 bytes
[I changed the subject line, as "vi and emacs" doesn't seem appropriate
any more].
les@chinet.chi.il.us (Leslie Mikesell) writes:
>... what do you do when you
>add or delete a loop surrounding existing code and want the indentation
>fixed?. I usually just pipe through cb.
Place the cursor on the opening { or closing } of the block and use >%
to increase indentation (by the current shiftwidth setting) or <% to
decrease it.
--
Geoff Clare <gwc@root.co.uk> (Dumb American mailers: ...!uunet!root.co.uk!gwc)
UniSoft Limited, London, England. Tel: +44 71 729 3773 Fax: +44 71 729 3273
Technical Details
Message-ID:
<2744@root44.co.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!pyrltd!root44!gwcReferences:
<1991Jun1.021505.4043@trl.oz.au> <1991Jun03.151727.9944@chinet.chi.il.us> <1148@iris.mincom.oz.au> <1991Jun11.203851.26928@chinet.chi.il.us>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!pyrltd!root44!gwc From: gwc@root.co.uk (Geoff Clare) Newsgroups: comp.editors Subject: Altering indentation of C code in vi Keywords: vi C indent Message-ID: <2744@root44.co.uk> Date: 18 Jun 91 13:24:45 GMT References: <1991Jun1.021505.4043@trl.oz.au> <1991Jun03.151727.9944@chinet.chi.il.us> <1148@iris.mincom.oz.au> <1991Jun11.203851.26928@chinet.chi.il.us> Distribution: comp Organization: UniSoft Ltd., London, England Lines: 15