如何将文本从 vi 复制/粘贴到不同的应用程序 [英] How to copy/paste text from vi to different applications

查看:42
本文介绍了如何将文本从 vi 复制/粘贴到不同的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不使用 :vs 的情况下复制/粘贴文本?如果我打开了两个 vi 窗口,我可以用鼠标复制/粘贴文本.我怎样才能用键盘来做?

Is it possible to copy/paste text without using :vs? If I have two vi windows open, I can copy/paste text with a mouse. How can I do it with a keyboard?

我发现了两个与此类似的现有问题,但都没有回答我的问题.
如何将 vi 中的代码复制到剪贴板
将内容从一个文件复制并粘贴到VI中的另一个文件

I found two existing questions that are similar to this, but neither one answers my question.
how to copy codes in vi to clipboard
Copy and paste content from one file to another file in VI

推荐答案

您可以使用 + 寄存器复制/粘贴(阅读更多:访问系统剪贴板)

You can copy/paste by using the + register (read more: Accessing the system clipboard)

"+gyy 将拉出一行,并将其放入 + 寄存器.您可以使用 "+p 粘贴到另一个窗口中> 在正常模式下,或 Ctrl+r + 在插入模式下.

"+gyywill yank a line, and put it into the + register. You can paste in your other window with "+p in normal mode, or Ctrl+r + while in insert mode.

如果您不想使用拆分窗口,除了使用系统剪贴板之外,真的没有其他方法可以在窗口之间粘贴.

If you don't wish to use split windows, there really is no other way to paste between windows apart from using the system clipboard.

这篇关于如何将文本从 vi 复制/粘贴到不同的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆