如何在VSVIM中进行反向选择?

发布于 2025-02-08 08:11:57 字数 454 浏览 2 评论 0原文

我想在VS2022中的VSVIM中逆转选定的文本。

例如:asdfg to gfdsa

我尝试过反向选定的文本此解决方案。 但是这些措施使我的选择取代了c。如果首先在视觉上删除文本,然后键入:设置Revins,我将获得一个错误:不允许范围

有什么整洁的方法可以逆转选择吗?

I want to reverse selected text in VsVim in VS2022.

For instance: asdfg to gfdsa

I have tried Reverse selected text and this solution.
But these measures made my selection replaced by c. If I secelct the text visually first, and type :set revins, I will get an error: No range allowed.

Is there any neat way to reverse selection?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

庆幸我还是我 2025-02-15 08:11:57

您不使用VIM。您正在使用VIM的部分重新实施,因此没有任何理由期望在VIM中有效的任何功能在该扩展中起作用。

例子,VSVIM不支持Revins选项,因此即使尝试依赖它的随机Internet解决方案也没有意义。此外,VSVIM不支持VimScript,因此仅使用VIM的解决方案,例如:

c<C-r>=split(@",'\zs')->reverse()->join('')<CR>

对您来说是无用的。

You are not using Vim. You are using a partial re-implementation of Vim so there is no reason whatsoever to expect anything that works in Vim to work the same in that extension.

Case in point, VsVim doesn't support the revins option so there is no point in even trying random internet solutions that depend on it. Moreover, VsVim doesn't support vimscript either so a working Vim-only solution like:

c<C-r>=split(@",'\zs')->reverse()->join('')<CR>

is useless to you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文