Powerline is a statusline plugin originally created for use in vim, and can also be used for statuslines and prompts in other tools, including bash, zsh and other shells. The shell feature in Visual Studio Code (VS Code) is one of those use cases.
What Is Powerline in Visual Studio Code (VS Code)?
Powerline is a statusline and prompt plugin that can be used in the shell feature for Visual Studio Code. It is a plugin that was originally developed for vim and can also be used in other tools like bash, zsh and other shells.
However, when you use Powerline in VS Code, you may run into an error where it doesn’t properly represent your Powerline prompt.
We’ll take a look at how to make Powerline work in VS Code.
How to Make Powerline Work in VS Code
It only takes two steps to make Powerline work in VS Code. The following solution works in OS X, but I believe a similar solution would apply on Windows or Linux:
- Download the proper patched font.
- In your user settings (Code | Preferences | Settings) add this:
{
"terminal.integrated.fontFamily": "Menlo for Powerline",
}
And now, my prompt in code looks right!
Yes, the colors look different than the previous screenshot. Since taking those screenshots, I changed from using the powerlevel9koh-my-zsh
theme to the powerline-go.
Frequently Asked Questions
How do you fix Powerline in Visual Studio Code?
If powerline isn’t displaying properly in Visual Studio Code, follow these steps:
- Download the patched font.
- Enter the following code to adjust the user settings:
{
"terminal.integrated.fontFamily": "Menlo for Powerline",
}
What is Powerline used for in Visual Studio Code?
Powerline can be used to create prompts in the shell feature in Visual Studio Code.