Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!samsung!noose.ecn.purdue.edu!bromine.ecn.purdue.edu!patkar From: patkar@bromine.ecn.purdue.edu (The Silent Dodo) Newsgroups: comp.editors Subject: Changing mode before starting vi Message-ID: <1990Aug20.180936.29942@ecn.purdue.edu> Date: 20 Aug 90 18:09:36 GMT Sender: news@ecn.purdue.edu (USENET news) Distribution: na Organization: Purdue University Engineering Computer Network Lines: 25 Having created enough confusion by asking the question about changing quadruple occrances to single ones, here is one more simple question. It seems that by default, vi creates files which are in mode 644. Is there a way to change this default? I have some directories which contain only simple executable scripts. While creating new files in this directory, it will be nice if the mode is automatically changed. Also, in some other directories I would like the mode to be read-only. You get what I mean! I can write a simple script like cp /dev/null $1 chmod 700 $1 vi $1 But this looks clumsy. Is there a better way than this? Probably there is some option you can set in your .exrc, but I could not find any such thing in the online help command. -- Anant (patkar@cn.ecn.purdue.edu)