可以不使用vim的小删除寄存器吗? [英] Is it possible to not use vim's small delete register?

查看:48
本文介绍了可以不使用vim的小删除寄存器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望任何已删除的文本总是进入编号寄存器,但我经常在编号寄存器中找到我最近删除的内容,但它不在那里,因为它少于一个线.

I'd like to have any deleted text always go into the numbered registers, but frequently I go to find something I deleted recently in the numbered registers and it's not there because it was less than one line.

编号寄存器 1 包含最近删除的文本删除或更改命令,除非该命令指定了另一个寄存器或文本少于一行(小删除寄存器然后使用).每次连续删除或更改时,Vim 都会移动寄存器 1 的先前内容到寄存器 2,2 到 3,依此类推第四,丢失寄存器9之前的内容.

Numbered register 1 contains the text deleted by the most recent delete or change command, unless the command specified another register or the text is less than one line (the small delete register is used then). With each successive deletion or change, Vim shifts the previous contents of register 1 into register 2, 2 into 3, and so forth, losing the previous contents of register 9.

这是一件相当罕见的事情,但是当它发生时,真的很烦人,因为我必须撤消回到我删除文本的地方,然后删除到命名寄存器中或在删除文本之前立即使用删除的文本0 因为我在粘贴我刚刚删除的小文本的过程中删除了其他内容(杂散的空白、糟糕的评论等等).

It's a fairly rare thing, but when it happens, it's really annoying because I have to undo back to the point where I deleted the text, then either delete into a named register or immediately use the deleted text before it's out of register 0 because I delete something else (stray whitespace, bad comment, whatever) on my way to pasting the small text I just deleted.

我希望小的删除条件对于输入编号寄存器 1-9 的文本无关紧要.有人知道实现这一目标的方法吗?

I'd like the small delete condition not to matter for text entering the numbered registers 1-9. Anyone know of a way to achieve this?

推荐答案

另一个这样的功能请求期间Reddit,发现 Vim 中有一个错误,当

During another such feature request on Reddit, it was found out that there was a bug in Vim that did exactly that when

:set clipboard^=unnamed

该错误已在 Vim 7.3.649 中修复.因此,如果您使用旧版本,您仍然可以从该错误中受益:-)

That bug has been fixed in Vim 7.3.649. So, if you use an older version, you could still benefit from the bug :-)

如果你真的认为这是有用的行为,你可以在 vim_dev 邮件列表上提出这个增强请求,尽管在一般而言,其他选项不受欢迎.如果您能够提出令人信服的论点并提供包含文档和测试的完整补丁,那么您的机会就会更高.

If you really think this is useful behavior, you could raise this enhancement request on the vim_dev mailing list, though in general, additional options are frowned upon. Your chances are higher if you can make a compelling argument and also supply a complete patch with documentation and tests.

这篇关于可以不使用vim的小删除寄存器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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