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

37498Re: multiple copy

Expand Messages
  • Ross A. Osborn
    Feb 28, 2003
      On Fri, Feb 28, 2003 at 07:58:46PM -0000, Yiu Wing wrote:
      > > Hi all,
      > > I usually select a block of text in visual mode and use d to cut it.
      > > I want to paste it somewhere later in the session. How can I cut more
      > > than 1 block and keep it in different buffer? What happens is that I cut
      > > a block and sometimes later I use dw or dd and the block gets
      > > overwritten. I want to keep it safe in some buffer. How to do it?
      > The last ten deleted blocks are in the numbered registers, and the '-'
      > register contains the last deleted text that's less than a line. To see
      > these deleted texts, you can do
      > :register
      > to find out.
      > To paste them in your file, in normal do <c-r> and then type the number or
      > '-' to paste the content of the corresponding register.

      This is for insert mode not normal mode.

      > For more details check out
      > :h registers

      Yes. Read this. I think it will answer all your questions.

      Instead of relying on the numbered registers and having to remember that
      the text you want to paste was the 7th most recent delete you might want
      to use the named registers a-z.

      To delete a word and save it in register 'b':


      To copy (yank) a word into register 'b' without deleting it:


      Then to paste it back into a file (possibly a different file):


    • Show all 8 messages in this topic