Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!ucsd!ucbvax!SAMADAMS.PRINCETON.EDU!tr From: tr@SAMADAMS.PRINCETON.EDU (Tom Reingold) Newsgroups: comp.editors Subject: "set modelines" in vi Message-ID: <9012051559.AA01923@samadams.Princeton.EDU> Date: 5 Dec 90 15:59:52 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: na Organization: Noo Joizy -- The Cultural Mecca Lines: 18 I discovered the "modelines" feature of vi. It's really great. In my ~/.exrc, I have "set modelines" and I can have a vi command in my text file so that the file can have its individual settings. For example, a C program of mine has indentations at 4 characters instead of 8, so I set shiftwidth to 4. The problem is that anything I set with one of these commands in my file seems to tell vi that the file has been modified immediately upon entering the editor. So I can't use ":q" or "ZZ" to quit. If I do, it will write out the file unnecessarily, making me recompile unnecessarily. Is there a way around this problem? -- Tom Reingold tr@samadams.princeton.edu OR ...!princeton!samadams!tr "Warning: Do not drive with Auto-Shade in place. Remove from windshield before starting ignition." Brought to you by Super Global Mega Corp .com