如何通过KEYBOARD ONLY从Windows应用程序复制/粘贴到vim-gnome(通过ssh运行到linux服务器)

时间:2017-07-24 02:48:42

标签: bash ubuntu vim virtualbox windows-subsystem-for-linux

原始问题:(请阅读以下部分中的更新)我在Windows 10主机上的Virtualbox上运行Ubuntu 16.04。通过在Windows上运行Bash的ssh访问Virtualbox。我可以进入并编辑所有内容然而,当我尝试将任何内容从Windows应用程序粘贴到VIM或从VIM粘贴到带有键盘快捷键的Windows应用程序时,它无法正常工作。没有任何本机密钥可以从Windows上的bash上的VIM复制到Windows应用程序。在VIM中,复制粘贴照常工作。

对于这个问题的未来访问者,我想我会编译一些引用来显示复制粘贴到Windows剪贴板到vim运行Putty和WSL不能正常工作:

  1. Putty手动参考显示,按设计你不能粘贴 来自windows的putty:https://superuser.com/a/85774/658319
  2. 在WSL上运行bash并将ssh运行到linux服务器上,无法用于复制 或粘贴(检查文章底部的COPY和PASTE)从Windows到Linux上的VIM或从Linux上的VIM到仅带键盘的窗口: https://alliterationapplications.com/putty-vs-ubuntu-on-windows/
  3. 能够在linux上运行vim进行复制粘贴的替代软件:

    1. 软件解决方案:

      1.1。小猫:https://superuser.com/a/1112362/658319

      1.2。 Autohotkey:https://superuser.com/a/1112362/658319

      1.3。超级大奖:https://superuser.com/a/450812/658319

      1.4。 conEmu:https://superuser.com/a/450812/658319

      1.5。使用Windows鼠标模拟键:https://superuser.com/a/426311/658319

      1.6。使用Gnu屏幕应用:https://superuser.com/a/85785/658319https://superuser.com/a/273490/658319

    2. 通过对腻子的修改(对我来说没有用):https://www.quora.com/How-can-you-copy-all-contents-of-a-text-file-opened-in-vim-through-Putty-on-a-Windows-desktop-to-Windows-clipboard/answer/Lifu-Tang

    3. 其他类似于VIM的编辑器可能具有更简单的复制粘贴功能(请测试并提及这些是否有效。我会更新答案):

      3.1。 NeoVIM

      3.2。原子

    4. 使用Windows上的Bash上的SSH连接到Linux服务器并复制到/从vim复制

      4.1。使用VCX服务器:https://stackoverflow.com/a/44534222/4752883 4.2。使用Autohotkey:https://stackoverflow.com/a/44534222/4752883

    5. 还有任何其他潜在的建议,只需将键盘复制粘贴到vs,通过wsl / putty /其他终端模拟器上的bash到linux?

      P.S。请不要发布任何使用鼠标方式或形式进行复制粘贴的答案..试图在此处明确说明..因为大多数提出此问题的用户都要求仅键盘解决方案

1 个答案:

答案 0 :(得分:1)

根据putty文档,它不允许使用键盘快捷键,因为如果按任何键,它就会反映在远程机器上。

https://superuser.com/questions/85772/putty-how-to-select-text-and-copy-text-using-keyboard-only

https://superuser.com/questions/490722/putty-alternative-with-keyboard-copy-paste