Same registers for different VIM tabs
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?
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...)
精彩评论