5

VSCode 命令行第一次打开的时候....

 3 years ago
source link: https://www.v2ex.com/t/800543
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
VSCode 命令行第一次打开的时候....

V2EX  ›  Visual Studio Code

VSCode 命令行第一次打开的时候....

  Kasumi20 · 1 天前 · 3128 次点击

会出现很多空格,怎么解决?

第 1 条附言  ·  1 天前

就第一个有问题,ctrl+shift+`打开新的就正常了。
指定字体没用。
17 条回复    2021-09-09 12:45:14 +08:00

rickiey

rickiey   1 天前   ❤️ 1

你这终端字体没配好吧

linshiyouxiang

linshiyouxiang   1 天前   ❤️ 1

感觉是终端字体问题,尝试指定 vscode 终端字体?

harwck

harwck   1 天前   ❤️ 2

在 Terminal 记得用 Mono 字体

cxsz

cxsz   1 天前   ❤️ 1

全角半角的问题?

Kiske

Kiske   1 天前   ❤️ 1

在 setting.json 中新增 "terminal.integrated.fontFamily": "'Sarasa Term SC', monospace"

RRRoger

RRRoger   1 天前   ❤️ 1

skinny

skinny   1 天前   ❤️ 1

我遇到的问题是中文显示正常,但如果 shell 是 pwsh,输出的中文的每一个字都会变成叠词,比如某命令的中文输出是“此命令的语法是”,在 vscode 的终端就会变成“此此命命令令的的语语法法是是”,直接运行 pwsh 不会遇到这个问题。没有找到解决方案。

skinny

skinny   1 天前   ❤️ 1

PowerShell 扩展自己实现的交互环境没有我提到的问题

Tumblr

Tumblr   1 天前   ❤️ 1

@skinny #7 同样是字体问题。

yunye

yunye   1 天前   ❤️ 1

喜迎黑客帝国 4 ?

xuboying

xuboying   1 天前   ❤️ 1

chcp 值不同?

skinny

skinny   1 天前   ❤️ 1

@Tumblr 不是字体问题,尝试设置任何字体都没有用,不是显示不全、有空格或乱码,而是中文显示正常,但是每个中文字符多输出了一次。

如果你有安装 PowerShell Core 7 可以试试,比如你可以在 vscode 的 PowerShell 控制台运行:echo "中文",会输出“中中文文”。不要用 PowerShell 扩展提供的那个集成终端试,那个没问题,而且它是以非交互启动,然后内部再通过代码提供交互功能。

Tumblr

Tumblr   1 天前

@skinny #12 尝试的字体数量还不够。。。因为我有遇到同样的问题,目前用的是 Sarasa Term SC,一切搞定,没问题了。

skinny

skinny   1 天前

@Tumblr 我刚刚下载安装了这个字体,设置之后重新开启 vscode 还是这老样子重复输出中文,可能我的哪个软件版本有 bug…… 我升级一下 PowerShell 试试,我的是 7. 1.4

skinny

skinny   1 天前

@Tumblr 我刚刚测试了 PowerShell 5.1,一切正常。然后再次在 vscode 终端测试 PowerShell 7. 1.4 的时候发现了一个见鬼的现象,只出现了一次,当时刚刚启动电脑和 vscode,然后打开了一堆软件,电脑有点卡,在 PowerShell 7.1.4 的 vscode 终端里输出中文时,最开始一瞬间是正常的,然后一重绘就又变成老样子了。我同样测试了 PowerShell 7.2.0 Preview-9,一样的毛病……

mgbaozi

mgbaozi   1 天前 via iPhone

我遇到过一次,release note 看到当时那个版本有关于字体渲染的改动,回滚到上一个版本就好了

2i2Re2PLMaDnghL

2i2Re2PLMaDnghL   19 小时 12 分钟前

中间的空格能否被单独选中并复制出来?

关于   ·   帮助文档   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   1373 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 90ms · UTC 23:57 · PVG 07:57 · LAX 16:57 · JFK 19:57
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK