I'm on a windows 10 machine and I recently installed VS Code to use instead of Sublime Text 3. I changed the integrated terminal in VS Code to default to git Bash. That is working just fine now but I seemed to have lost my color coding for files and directories. I tried adding eval "$(dircolors -b /etc/DIR_COLORS)"
to my .bash_profile but it still doesn't work in the integrated terminal, however if I open Bash externally all of my colors are still there.
相关问题
- Extended message for commit via Visual Studio Code
- Where are Automatic Type Acquisition typescript de
- Typescript: Why doesn't visual studio code rep
- .NET Core 3.1 CreateHostBuilder Cannot parse JSON
- Execute C program till Ctrl+C hit in the terminal
相关文章
- Visual Studio Code, MAC OS X, OmniSharp server is
- Omnisharp in VS Code produces a lot of warnings ab
- Emacs/xterm color annoyance on Linux
- Visual Studio Code command for “repeat last comman
- make GitX open via Terminal for the repo laying at
- VSCode remove warnings from problems tab
- Configure a TypeScript project with common depende
- Visual Studio Code disabling Normal, Edit and Visu
Solve Windows vscode Open Git Bash No Color
ANSICON
and move it toC:\ Program Files \
.Modify the VSCode settings:
Reopen the terminal.
I was able to get colors to work in my Bash integrated terminal in VSCode by configuring my
C:\Program Files\Git\etc\bash.bashrc
file. I found that simply usingeval "$(dircolors -b /etc/DIR_COLORS)"
alone was not sufficient. At the top of myC:\Program Files\Git\etc\DIR_COLORS
file I saw this:So I tested using
ls --color
and it worked! I then created the following aliases in bash.bashrc:I also found that you can customize the colors (and composition) of the Bash prompt by editing the
C:\Program Files\Git\etc\profile.d\git-prompt.sh
file and includingshopt -q login_shell || . /etc/profile.d/git-prompt.sh
in bash.bashrc.I can't explain why the ls alias is needed for the integrated terminal but now I'm happy since my colors now match the external terminal.
VSCode team have removed customizing colors from user settings page. Currently using the themes is the only way to customize terminal colors in VSCode. For more information check out issue #6766.
Answer copied from : Color theme for VS Code integrated terminal