开发者

Same registers for different VIM tabs

开发者 https://www.devze.com 2023-03-12 06:01 出处:网络
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.

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...)

0

精彩评论

暂无评论...
验证码 换一张
取 消