Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.unix.questions Subject: Re: Two vi questions. Message-ID: <4092@buengc.BU.EDU> Date: 9 Sep 89 22:36:16 GMT References: <4237@ncar.ucar.edu> <3937@mentor.cc.purdue.edu> <614@jvncf.UUCP> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.unix.questions Distribution: usa Organization: Boston Univ. Col. of Eng. Lines: 33 In article <614@jvncf.UUCP> saroff@jvncf.csc.org.UUCP (Steve Saroff lac00001) writes: >I have two questions. > >1) Can you tell me why when I try to read in a file with the >":r" command, it barfs for long path names? Most vi's do globbing (filename expansion) internally, rather than asking the system to do it. This causes many problems, because the do-it-yourselfers wrote a lousy globber. I always try to use wildcards and tildes in filenames, and get "too many filenames" as a response. Apparently, though I've never seen it with mine, yours has a too-short buffer for the filename. I've always wanted to get ahold of a real vi source and fix it so that the :r and :w commands do a system call that uses sh to do its globbing. Then again, for all I know it's actually passing the ex-commands (commands that start with a colon) unglobbed to ex, and it's ex that I need to fix. >2) Is there any quick and dirty way of inserting a character(s) say >at the front of lines (e.g. quick commenting out of 20 lines of code) Quick _and_ dirty? Well, either I#................... or :wq(pad, pad, pad, pad, pad, pad, pad, pad, thwap! flip, page, page, page). --Blair "...and comp.editors..."