2

I'm trying to make a copy paste from 1 file I have opened in a tab to another file I have opened in another tab.

So I use the visual block to get my selection, yank it, but when I switch to other tab, it doesn't paste, it says:

Nothing to register

Is there a way to use same registers for different tabs?

Mike Bailey
  • 11,600
  • 12
  • 60
  • 118
JTL
  • 21
  • 1
  • This is quite strange. I use copy and paste between tabs and I never had problems. – Heisenbug Jun 13 '11 at 10:22
  • 1
    There are no local registers. Try starting with `vim -u NONE`, maybe some plugin interferes with yank or paste commands. – ZyX Jun 13 '11 at 15:08
  • 1
    Could you provide more information: * what command do you use for yanking? * what for pasting? * what for creating the tabs? You could also try http://superuser.com/questions/237655/sharing-vim-yank-buffer/296308#296308 as a workaround. – Aaron Thoma Jun 13 '11 at 22:41
  • Try explicitly mentioning the register. E.g. when pasting, use `"0p`. To look up, what your registers contain, use `:reg` – Christian Brabandt Jun 14 '11 at 19:03

1 Answers1

2

Hmm...are you talking about the operating system's tabs, or Vim's tabbing system? Creating a new tab (in something like Terminal) and running vim won't share registers, because you'll be running two separate vim processes. Running two tabs within the same copy of vim should share without problems.

To put that another way, type:

:tabnew

...into vim. Is the result familiar? Do you get the same kind of tab you're describing?

If not, that's the problem. Type :help tabpage to learn about vim's tabbing system, which will share registers & more.

(If so - if that is the same kind of tab you're talking about - then the mystery continues...)

Kris Jenkins
  • 3,893
  • 27
  • 40