Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!cernvax!chx400!chx400!bernina!neptune!inf.ethz.ch!wyle From: wyle@inf.ethz.ch (Mitchell Wyle) Newsgroups: comp.editors Subject: Re: vi range delete sometimes gets lost Summary: use named buffers Message-ID: <27776@neptune.inf.ethz.ch> Date: 28 Mar 91 19:32:21 GMT References: <1991Mar26.181950.3078@chinet.chi.il.us> Sender: news@neptune.inf.ethz.ch Reply-To: wyle@inf.ethz.ch (Mitchell Wyle) Organization: Departement Informatik, ETH, Zurich Lines: 23 In <1991Mar26.181950.3078@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes: >At seemingly random times when I delete a range of lines in vi using >the ex mode command :'a,.d >(delete from mark a through the cursor line), I can't move the deleted text >with 'p' or 'P' to another location, although if I remember to do it >immediately 'u' will undo the deletion. I never have this problem using >ndd to delete some number of lines, but I prefer to refer to ranges using >the "mark to cursor" notation. >Does anyone know why this happens or how to avoid it? Dunno why it happens, though sysVr3 vi is suspect. The solution is 1) don't delete in ex mode; do it in visual mode as in d`a It saves you half the keystrokes. 2) To be safe, you might try "ad`a to but the deleted text in buffer a. "Vi users do it visually."