April 8th, 2020

Meet Visual Studio for Mac’s New Integrated Terminal!

Jon Galloway
Principal Program Manager

Our users tell us they frequently use a terminal for a variety of tasks – running front-end tasks (e.g. npm, ng, or vue), managing containers, running advanced git commands, scaffolding, automating builds , executing Entity Framework commands, viewing dotnet CLI output, adding NuGet packages, and more. Application switching can slow you down and cause you to lose focus. It’s no surprise that an integrated terminal is one of our top feature requests and we’re really happy to announce this feature is now in preview.

Animation showing the Integrated Terminal
The new Visual Studio for Mac includes support for customization, including themes and fonts. This example is using the Powerlevel10K oh-my-zsh theme and Cascadia Code PL font.

 

Getting started with the integrated terminal

The new terminal is included in the latest preview version of Visual Studio for Mac 8.6. To use it, you’ll need to switch to the Preview channel. Once you’ve updated, you can launch the new terminal in one of several ways:

  • View > Pads > Terminal menu
  • Ctrl + ~ keyboard shortcut (and Ctrl + ‘, to match Windows)
  • Ctrl + ` will toggle the Terminal pad to be shown or hidden
  • Search in search bar: terminal (handled by menu name)
  • Using a “New Terminal” button in the Terminal pad

After you’ve opened it, you’ll see the terminal pad at the bottom of the Visual Studio for Mac window.

Visual Studio for Mac Integrated Terminal
The Visual Studio for Mac integrated terminal immediately after being launched.

 

Now that you’ve got the terminal set up, let’s look at some of its features.

Sensible defaults

By default, when the terminal is launched it will:

  • Set the working directory to the path of the current solution
  • Load the default system shell (unless the IDE is configured to use a different shell)
  • Include the Azure CLI in the set of defaults

Search

To help filter through complex terminal output, developers need to be able to search the content of the terminal window. You can use the standard Search > Find… command for this. You’ll notice the Find UI is similar to the search experience in an editor window:

Search experience in the Visual Studio for Mac Integrated Terminal
Search experience in the Visual Studio for Mac Integrated Terminal

 

Integration with the Mac terminal

One really nice feature of the integrated terminal is that it utilizes your Mac system terminal. That means that your terminal customizations – zsh, oh-my-zsh, etc. – work the way you’re used to. If you’ve spent some time nerding out on a beautiful terminal, it’ll be right there for you when you open the Visual Studio for Mac Integrated Terminal. Not only that, but your command history works in sync between your system terminal and Visual Studio for Mac. When you open a new terminal pad in Visual Studio for Mac, hit the up arrow to see your previous commands from the system terminal.

Multiple instances

Multiple instances of the terminal may be running at any time. You can manage the instances by:

  • Switching between each instance
  • Creating new instances
  • Closing an instance

Multiple terminal instances in Visual Studio for Mac
Multiple terminal instances in Visual Studio for Mac

 

Configuring the Terminal Font

You’ll notice a new font selector for Terminal Contents in the Preferences > Environment > Fonts pane. By default, the font will be the same as Output Pad Contents, using Menlo Regular, size 11. You can set it to any font, independent of your editor font.

Terminal Font Settings
Customizing the font settings for the integrated terminal

 

Give it a try today!

The new integrated terminal is now available in Visual Studio 2019 for Mac 8.6 Preview. To start using it, make sure you’ve downloaded and installed Visual Studio 2019 for Mac, then switch to the Preview channel.

If you’re using Windows, Visual Studio has an experimental terminal as well, also in preview.

As always, if you have any feedback on this, or any, version of Visual Studio for Mac, we invite you to leave them in the comments below this post or to reach out to us on Twitter at @VisualStudioMac. If you run into issues while using Visual Studio for Mac, you can use Report a Problem to notify the team. In addition to product issues, we also welcome your feature suggestions on the Visual Studio Developer Community website.

We hope you enjoy using Visual Studio 2019 for Mac 8.6 Preview 1 as much as we enjoyed working on it!

 

Author

Jon Galloway
Principal Program Manager

Jon is a Principal Program Manager on the .NET Community team, working on .NET and supporting .NET live streams and virtual events. He's the author of several programming books, tutorials and video courses on .NET development.

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • John Juback

    I use the terminal to display output from a .NET Core console app. But there doesn’t appear to be a way to clear (or delete) the terminal window. Still a big improvement over having a separate terminal window open up each time I run the app.