从一个寄存器复制到另一个 [英] Copy from one register to another

查看:30
本文介绍了从一个寄存器复制到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不粘贴到剪贴板上的情况下将一个寄存器的内容复制到另一个?我拉了一个文本,它在默认的 " 寄存器中被拉了.现在我想复制另一个文本而不删除/覆盖 " 寄存器.所以我想将 " 寄存器的内容移动到一些 ab 寄存器,以便我可以复制 中的新文本".如何做到这一点?

How to copy the contents of one register to another without pasting on clipboard? I'd yanked one text and it got yanked in the default " register. Now I want to copy another text without deleting/overwriting " register. So I want to move the contents of " register to say some a or b register so that I can copy the new text inside ". How to do this?

推荐答案

要在寄存器之间复制或交换值,您可以使用 :let 命令,例如将b寄存器的内容复制到a:

To copy or swap values between registers you can use the :let command, for example to copy the contents of the b register to a:

:let @a=@b

或者将"寄存器的内容复制到a:

Or copy the contents of the " register to a:

:let @a=@"

查看此 Vim 提示以获得一些好的键映射建议:

Check this Vim Tip for some good key mapping suggestions:

这篇关于从一个寄存器复制到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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