Loading ...
Sorry, an error occurred while loading the content.

Re: Deleting text without saving it in the buffer

Expand Messages
  • fritzophrenic
    ... You have your answer, but consider: Whenever you delete something, it goes into a numbered register, 1 . Whatever was in 1 goes into 2 , and so on
    Message 1 of 7 , Sep 6, 2008
    • 0 Attachment
      On Sep 5, 10:22 am, "Srikanth S" <srikanth....@...> wrote:
      > Hi everyone,
      > Usually the dw, dd commands delete the text but they also store it in the
      > buffer, more like the "Cut" option of a GUI text editor. What I want is to
      > delete but without storing the deleted text in the buffer; like the "Delete"
      > option of a GUI text editor.
      >
      > Srikanth

      You have your answer, but consider:

      Whenever you delete something, it goes into a numbered register, "1".
      Whatever was in "1" goes into "2", and so on until the last register
      ("9") just loses its value ("0" always gets the last yank instead of a
      delete).

      So, if the trouble you are having is that what you delete over-writes
      something you yanked, there is no need to worry about sending it to
      the "black hole" register. You can just paste from register 0, like
      "0p.

      If you over-write something you previously cut, like with dd, you can
      get it back by using register 2, like "2p.

      See :help quote_number for details.
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.