jjr@ut-emx.UUCP (Jeff Rodriguez) (06/20/88)
With the BSD 4.3 and AIX versions of vi that I use, the "set autoindent" option replaces every 8 spaces with a tab when indenting. Is there a way to make it use spaces instead? Jeff Rodriguez jjr@emx.utexas.edu
finn@eleazar.dartmouth.edu (Andy Behrens) (06/23/88)
In article <3493@ut-emx.UUCP> jjr@ut-emx.UUCP (Jeff Rodriguez) writes: > Vi's "set autoindent" option replaces every 8 spaces > with a tab when indenting. > Is there a way to make it use spaces instead? First get rid of any tabs that are in the file, then ":set tabstop=60". This will force vi not to use a tab unless the line is indented at least 60 spaces. You won't be able to use the tab key any more, but you can still use ^T and ^D for indenting. You might like to map the tab key to ^T if you are used to it. (:map ^V^V^I ^V^T). Andy Behrens {astrovax,linus,harvard,decvax}!dartvax!burcoat!andyb andyb%burcoat@dartmouth.EDU
clarkm@tekig4.TEK.COM (Clark Morgan) (06/25/88)
In article <8979@dartvax.Dartmouth.EDU> andyb@burcoat.uucp (Andy Behrens) writes: >First get rid of any tabs that are in the file, then ":set tabstop=60". >This will force vi not to use a tab unless the line is indented at >least 60 spaces. > >You won't be able to use the tab key any more, but you can still use ^T >and ^D for indenting. You might like to map the tab key to ^T if you >are used to it. (:map ^V^V^I ^V^T). > > Andy Behrens > Yep, this is about the same technique I use. But it sure is a pain in the butt if you've set up the EXINIT environment variable like Andy describes above _and then_ edit a file that's littered with tabs. Flick bic: Vi is a nice editor: it gets the job done quickly and uses minimal key strokes to accomplish a given task. But I can't stand the fact that it puts tabs in my documents/programs when I never even touched the Tab key. If the designers of this program thought that auto-tab-insertion was such a neat idea, how come they didn't go the extra mile and give us an option that says: "I won't auto-tab your files." Lord knows Vi has an option for everything else :-). Are you listening AT&T, Berkely? -- Clark Morgan, Tektronix Lab Instruments Engineering (503) 627-3545 clarkm@tekig4.LEN.TEK.COM | {...,decvax,uw-beaver}!tektronix!tekig4!clarkm US Mail: Tektronix, P.O. Box 500, DS 39-087, Beaverton, OR 97077
kathy@bakerst.UUCP (Kathy Vincent) (06/26/88)
In article <2965@tekig4.TEK.COM> clarkm@tekig4.UUCP (Clark Morgan) writes: > > Vi is a nice editor: it gets the job done quickly and uses > minimal key strokes to accomplish a given task. But I can't > stand the fact that it puts tabs in my documents/programs when > I never even touched the Tab key. If the designers of this > program thought that auto-tab-insertion was such a neat idea, > how come they didn't go the extra mile and give us an option > that says: "I won't auto-tab your files." I'm coming in late to this discussion, so if I missed something, well, sorry. But there *is* an option that says not to auto-tab. I use vi all the time - using SVR2 and SVR3 on 3B20s, and using 3.5 UNIX on my on my UNIX PC. I never get any tabs I don't explicitly ask for. I did a :se all to check the settings I have when I'm working, and included in the list is one noautoindent That must be the default on all the systems I work on because I don't ever set up anything. If I reset that with :se autoindent I get the automatic indention/tabbing I gather you're talking about. But resetting to :se noautoindent turns it off again. If it matters, hardtabs=8 and tabstop=8. Kathy Vincent ------> {ihnp4|att|codas|pacbell}!bakerst!kathy ------> { favourite AT&T gateway }!wruxh!unix
clarkm@tekig4.TEK.COM (Clark Morgan) (06/28/88)
?In article <1219@bakerst.UUCP> kathy@bakerst.UUCP (Kathy Vincent) writes: >In article <2965@tekig4.TEK.COM> clarkm@tekig4.UUCP I whine: > > ....about Vi putting tabs in my files.... > ?I'm coming in late to this discussion, so if I missed something, ?well, sorry. ? ?But there *is* an option that says not to auto-tab. ? ?I use vi all the time - using SVR2 and SVR3 on 3B20s, and using ?3.5 UNIX on my on my UNIX PC. I never get any tabs I don't explicitly ?ask for. ? ?I did a ? ? :se all ? ?to check the settings I have when I'm working, and included in the ?list is one ? ? noautoindent ? ?That must be the default on all the systems I work on because I don't ?ever set up anything. .... ? ?Kathy Vincent ------> {ihnp4|att|codas|pacbell}!bakerst!kathy ? ------> { favourite AT&T gateway }!wruxh!unix ==================================================================== Um Kathy, I want autoindent + NO TABS (for C programs and the like). ==================================================================== -- Clark Morgan, Tektronix Lab Instruments Engineering (503) 627-3545 clarkm@tekig4.LEN.TEK.COM | {...,decvax,uw-beaver}!tektronix!tekig4!clarkm US Mail: Tektronix, P.O. Box 500, DS 39-087, Beaverton, OR 97077
ronc@cerebus.UUCP (Ronald O. Christian) (06/30/88)
I never did like the autoindent feature anyway -- it seems to indent when I don't want to more often than it indents when I want to. But that didn't stop me from using the tab key, even though I don't like tabs in my files either. I just made it a habit of running the file through "indent" upon exit from vi. Is "indent" also available under system V, I wonder? Ron -- Ronald O. Christian (Fujitsu America Inc., San Jose, Calif.) {amdahl, pyramid, sun, unisoft, uunet}!cerebus!ronc Calling all Fujitsu Usenet sites! Contact cerebus!ronc or ronc@fai.com to establish uucp connection.
daemon@uwmcsd1.UUCP (The Devil Himself) (07/10/88)
Simply set tabstop=70 in EXINIT, VI will not use tabs for autoindent. Can you imagine a case where 70-space indent is needed ? From: zhao@csd4.milw.wisc.edu (T.C. Zhao) Path: csd4.milw.wisc.edu!zhao ---------------------------------------------- ARPA: zhao@csd4.milw.wisc.edu UUCP: {...}!uwmcsd1!csd4!zhao BITNET: zhao%csd4.milw.wisc.edu@WISCMAC3.BITNET