当我开火时格维姆在 Cygwin 的后台薄荷味终端,Unicode UTF-8 字符开始显示为问号。当我退出时格维姆,薄荷味恢复到正确的行为。此外,男人当页面输出呈现为颜色时也会消失格维姆在后台调用。运行reset
并不能解决问题。有什么方法可以解决这个问题吗?
$ echo -e "\xce\xbb\x0a"
λ
$ '/cygdrive/c/Program Files (x86)/vim/vim82/gvim' &
[1] 8340
$ echo -e "\xce\xbb\x0a"
?
$ wait # Quit gvim
[1]+ Done '/cygdrive/c/Program Files (x86)/vim/vim82/gvim'
$ echo -e "\xce\xbb\x0a"
λ
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
$ uname -a
CYGWIN_NT-10.0 dell 3.1.5(0.340/5/3) 2020-06-01 08:59 x86_64 Cygwin
$ gvim --version # Opens dialog window showing:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 15 2019 23:09:16)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-12
Compiled by appveyor@APPVYR-WIN
答案1
推杆格维姆在子 shell 的后台可以避免这个问题。
$ echo -e "\xce\xbb\x0a"
λ
$ (gvim &)
$ echo -e "\xce\xbb\x0a"
λ