Vim + tmux + WSL 在导航文档时显示方块和奇怪的字符 [英] Vim + tmux + WSL shows squares and strange characters when navigating doc

查看:48
本文介绍了Vim + tmux + WSL 在导航文档时显示方块和奇怪的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以毫无问题地在 Windows Ubuntu 子系统中使用 vim.

I am able to use vim within Windows Ubuntu subsystem without issues.

然后,当在 tmux 中运行 Vim 并输入文本时,大多数字符都显示为带有引号的奇怪方块,而不是实际的字母.[这是 vim 文本的屏幕截图][1]

Then when running Vim within tmux, and typing text most of the characters come up as weird squares with a quotation mark inside instead of the actual letter.[This is a screen shot of the vim text][1]

[我有类似的行为][2] 在 tmux (Ctrl+b+[) 中突出显示文本时在控制台中.

[I have a similar behaviour][2] within the console when highlighting text within tmux (Ctrl+b+[).

推荐答案

该问题与在我的 bashrc 中设置 TERM 相关,如下所示:导出 TERM=screen-256color-bce

The issue was related with setting the TERM within my bashrc like the following: export TERM=screen-256color-bce

在注释掉该行后,我的 Term 设置为 screen-256color 并且效果很好.

After commenting out that line, my Term was set to screen-256color and it just worked fine.

不知道为什么会这样

这篇关于Vim + tmux + WSL 在导航文档时显示方块和奇怪的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆