home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.editors      What? Edlin ain't good enough for you?      123,932 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 123,921 of 123,932   
   Kenny McCormack to achowe@snert.com   
   Re: Vi: is there any way not to yank tex   
   17 Feb 26 14:08:01   
   
   From: gazelle@shell.xmission.com   
      
   In article <10n1ham$1mgl9$1@dont-email.me>,   
   Anthony Howe   wrote:   
   >On 2026-02-16 17:28, Janis Papanagnou wrote:   
   >>> Use "_dd and similar to not put the deleted text in a register.   
   >>> See :h "_   
   >>   
   >> Do you know whether that register was existing in classical Vi ?   
   >> (I don't think so but, frankly, I don't recall and I'm curious.)   
   >   
   >The "a .. "z and "1 .. "9 buffers are part of historical `ex` and `vi`,   
   >see SUS https://pubs.opengroup.org/onlinepubs/9799919799/ buffer   
   >definition.   
      
   But that's not Janis's question.  The question is whether or not classical   
   vi has the "_" (black hole) register.  And the answer to that is No.   
      
   >I used to work on Mortice Kern Systems maintaining their DOS `vi` while we   
   >were balloting POSIX.2. The named buffers were part of the historical `vi`   
   >and the MKS independent clone.   
      
   Right.  But since we are in this general area and not to change the subject   
   but to change the subject, let me add that I have never been able to figure   
   out the logic of the numbered buffers.  I've never seen a good explanation   
   of why they are there and how you might use them to your benefit.  And   
   every time I've tried to use them, things are not where I expect them to   
   be.  That is, when I do the "registers" command (in Vim), the contents of   
   the numeric buffers always seems random/unpredictable to me.   
      
   >As for the OP, deleting / changing always included a yank into the numeric   
   >buffers.  That is historical behavior and documented in SUS.   
      
   Yeah, but which one - and for how long?   
      
   Anyway, it is not clear what OP is actually concerned about.   Why should   
   one care about whether or not yanking puts text into the (unnamed) buffer   
   or not?  Is it an efficiency concern (in which case, it is almost certainly   
   an unnecessary concern) or is about wiping out something that you wish to   
   keep?  (If the later, then you should, as detailed upthread, store it into   
   some other register.  That's what I do; if I think I may later need what I am   
   yanking or deleting, then I yank/delete it into a named register [*]).   
      
   [*] Which, of course, also puts it into the unnamed register.   
      
   --   
   A racist, a Nazi, and a Klansman walk into a bar...   
      
   Bartender says, "What will it be, Mr. Trump?"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca