Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-adm!brl-smoke!smoke!es!Robert_Toxen%anvil.UUCP@harvard.arpa From: Robert_Toxen%anvil.UUCP@harvard.arpa Newsgroups: net.unix-wizards Subject: Vi macro problem solved Message-ID: <1919@brl-smoke.ARPA> Date: Wed, 19-Mar-86 08:35:09 EST Article-I.D.: brl-smok.1919 Posted: Wed Mar 19 08:35:09 1986 Date-Received: Sat, 22-Mar-86 02:23:47 EST Sender: news@brl-smoke.ARPA Lines: 36 > From: "Todd C. Williams [Jedi Knight]" > Subject: Vi bug: multi-line abbrev w/ ai set > > I want to have an abbreviation that will print out the following 5 lines: > > main(argc,argv) > int argc; > char *argv[]; > { > } > > I have set autoindent in this file. The problem is that, with autoindent > set, multiline abbreviations are tabbed in by autoindent, with (apparently) > no way to stop this. > > EXAMPLE that does NOT work: > > set autoindent > abbreviate aaaaa main(argc,argv)^M^Iint argc;^Mchar *argv[];^M^D{^M} > > We are running 4.1bsd on a VAX-11/780. > | Todd C. Williams > | {decvax, et al.}!ittatc!dcdvaxb!tcw Try: set autoindent abbreviate aaaaa main(argc,argv)^M^Iint argc;^Mchar *argv[];^M^V^D{^M} Note that to enter ^V^D you must precede each with a control-V, i.e. type: ^V^V^V^D. Note also that you can't get "0^D" but putting lots of "^D"s will get the same thing. Bob Toxen Stratus Computer {ucbvax!ihnp4,harvard}!anvil!bob ============================