Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Two vi questions. Keywords: vi Message-ID: <1141@virtech.UUCP> Date: 9 Sep 89 14:51:38 GMT References: <4237@ncar.ucar.edu> <3937@mentor.cc.purdue.edu> <614@jvncf.UUCP> Distribution: usa Organization: Virtual Technologies Inc Lines: 24 In article <614@jvncf.UUCP>, saroff@jvncf.UUCP (Steve Saroff lac00001) writes: > 1) Can you tell me why when I try to read in a file with the > ":r" command, it barfs for long path names? It never happens to me. > 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) :start_line_no,end_line_no s/^/# / which places a "# " at the beginning of each line between, and including, start_line_no and end_line_no Usually I go to the first line and mark it with an a by typing "ma" then I go to the last line and type the following: :'a,. s/^/# / -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+