在 Bash/Windows 10 中使用 nano 编辑文件的问题

Tek*_*kus 8 bash windows-10 windows-subsystem-for-linux

每当我在 Windows 10 Linux 子系统中使用 nano 编辑文件时,我都会遇到显示问题。

我将使用 Bash/SSH 连接到远程系统(Virtualbox 上的本地 CentOS7 VM)。然后,我将继续使用 nano 在所述远程系统上编辑文件。

我将打开一个文件,开始删除文本,突然间,整行文本开始消失。我必须关闭并重新开始我的工作。当我厌倦它时,我会切换到vim。我宁愿在 nano 中,这对我所做的基本工作很有效。

还有人看到这个吗?

编辑 #1

  • 简单地在 nano 中导航文档可能会导致此问题
  • vim 和 Putty 的行为方式不同
  • Ctrl+Shift + 6 不能解决问题
  • 本质上使用 CentOS7 的 vanilla 安装,无需修改 shell
  • AFAIK,当我访问我的 Ubuntu Server VPS 时,这个问题似乎没有发生

Aul*_*nen 4

这是由于远程 terminfo 不兼容造成的。你可以尝试这个修复:

\n\n
TARobison commented on Feb 22, 2017 \xe2\x80\xa2\n@ShimShamSam I had the exact same problem and it was killing me.\nI work on a few different servers and only the CentOS one was behaving\nlike this. Using the following when I log in has so far fixed the problem\nfor me.\n\nstty sane\nexport TERM=linux\n\nI\'m new to all of this, so maybe we aren\'t talking about the same thing\nhere, but I thought I\'d offer what little I could.`\n
Run Code Online (Sandbox Code Playgroud)\n\n

更多信息请参见:https://github.com/Microsoft/WSL/issues/1436

\n\n

这是一个类似的问题。如果您无法解决问题,您可以检查一下:https://serverfault.com/questions/329154/ssh-garbling-characters-in-vim-nano-on-remote-server

\n