Visual Studio Code 内置终端的shell和字体设置,让它和iTerm2一样炫酷

版权声明:本文为博主(SimonLiu)原创文章,未经博主允许不得转载。 https://blog.csdn.net/toopoo/article/details/85691299

在我前面的一片博文中,说明了如何打造iTerm2:
默认终端 + iTerm2 + oh_my_zsh + agnoster theme + Powerline fonts + solarized 打造macOS炫酷终端

Visual Studio Code内置的终端,也可以设置成这样的效果,如图:
Visual Studio Code内置的终端效果

但是默认情况下,Visual Studio Code的shell还是默认的bash,所以要想它也有如上一篇博文那样的效果,需要进行如下设置。

本文以macOS为例

下载powerline等宽字体

任意目录下载menlo for powerline字体:

git clone https://github.com/abertsch/Menlo-for-Powerline.git

找到这几个字体,双击安装。

设置settings.json

添加如下几行

"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"

即可。

如果希望终端中运行iTerm2,再添加如下两行(不知为啥我这里无效,先不管了)

 "terminal.explorerKind": "external",
 "terminal.external.osxExec": "iTerm.app"

猜你喜欢

转载自blog.csdn.net/toopoo/article/details/85691299