Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!netsys!macomh!macom1!larry From: larry@macom1.UUCP (Larry Taborek) Newsgroups: comp.editors Subject: Re: Vi Turing machine question Message-ID: <4859@macom1.UUCP> Date: 17 Jul 89 11:26:47 GMT References: <1570@agora.UUCP> Organization: CENTEL Federal Systems, Reston, VA. 22091-1506 Lines: 28 From article <1570@agora.UUCP>, by rickc@agora.UUCP (Rick Coates): > > Another question - > what's the easiest way to globally append/insert text on the > end/beginning of lines? > I don't know how to do it in vi at all - and in ex it's clumsy. > > Rick Coates No problem Rick, The up carrot '^' means the beginning of a line, so to globally insert text at the beginning of a line try... :%s/^/this is to be inserted/g The dollar symbol means the end of a line, so use the following... :%s/$/this is to appended/g Hope this helps. -- Larry Taborek ..!uunet!grebyn!macom1!larry Centel Federal Systems larry@macom1.UUCP 11400 Commerce Park Drive Reston, VA 22091-1506 703-758-7000