gpt4 book ai didi

vim - 如何在vim普通模式下选择所有文本?

转载 作者:行者123 更新时间:2023-12-01 09:16:43 25 4
gpt4 key购买 nike

是否有“仅键盘”方式来选择整个 vim 文档,其方式相当于在正常模式下用鼠标左键单击和拖动?请不要将此与在可视模式 (ggVG) 中选择所有文本相混淆。我希望能够通过右键单击粘贴到 Notepad++ (ggVG/ggVGy,然后在 Notepad++ 中右键单击粘贴不会复制文档)来跟进此操作。谢谢

最佳答案

Again, the "ggVG" commands are not working, nor are the "+y" commands (which I should have mentioned in my original post). Perhaps it is worth noting that I am working on a Windows local machine (where I have notepad++ open) and am generating the vim file on a linux virtual machine (slurm cluster). Under these working conditions, if I left-click drag over the vim doc and right-click paste in notepad++, the selected text copies over. However, the process is cumbersome for large files, hence my inquiry. Thanks again.



当然,您应该提到这一点,因为这根本不是一个毫无意义的细节。

在终端中手动选择只能选择当前显示在视口(viewport)中的文本,这对于较大的文件显然很麻烦。在远程机器上复制并在本地机器上粘贴(反之亦然)的唯一实用方法是启用 X 转发并针对 X 库在远程机器上构建 Vim。这将为您提供您想要的:共享剪贴板。

如果您不能或不想在远程机器上安装必要的东西,您将无法以实际的方式实现目标。

作为一种轻量级的替代方案,您可以简单地 scp远程文件到您的本地计算机。

关于vim - 如何在vim普通模式下选择所有文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42428400/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com