Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!fortune!rpw3 From: rpw3@fortune.UUCP Newsgroups: net.bugs.4bsd Subject: Re: mode lines in vi - (nf) Message-ID: <3139@fortune.UUCP> Date: Mon, 23-Apr-84 23:03:05 EST Article-I.D.: fortune.3139 Posted: Mon Apr 23 23:03:05 1984 Date-Received: Tue, 24-Apr-84 19:16:42 EST Sender: notes@fortune.UUCP Organization: Fortune Systems, Redwood City, CA Lines: 35 #R:cbosgd:-128100:fortune:2000009:000:1233 fortune!rpw3 Apr 23 19:01:00 1984 Instead of "mode lines", I would prefer what someone else suggested: Extend the $HOME/.exrc to include "startup actions" based on filename pattern matches, like "*.c) set autoindent" Whatever you do, make SURE that it is ONLY the person who executes "vi" that gets to say what it does. This seems to necessarily imply data in a separate file, probably in $HOME. The use of "./.exrc" is full of more Trojan Horse problems. Don't include it. But note that the filename patterns in $HOME/.exrc could include slashes: */man/*) set para=QSQEBSBELPPPRTIPDSDEFSFE */src/*) set autoindent showmatch nowrap That only works if you're OUTSIDE the directory, but using 'csh' patterns, you could even say if($cwd =~ */man/*) set para=QSQEBSBELPPPRTIPDSDEFSFE if($cwd =~ */src/*) set autoindent showmatch nowrap or if($fullpath =~ ...) ... The point is, there are LOTS of ways to get the functionality, without the (1) security problems, and (2) making textfiles suddenly be editor dependent (I use 'vi' MOST of the time, but also use 'ed', 'screen', etc.). Rob Warnock UUCP: {ihnp4,ucbvax!amd70,hpda,harpo,sri-unix,allegra}!fortune!rpw3 DDD: (415)595-8444 USPS: Fortune Systems Corp, 101 Twin Dolphin Drive, Redwood City, CA 94065