search
HomeDevelopment ToolsVSCodeHow to set up vscode terminal for optimization

How to set up vscode terminal for optimization

Dec 16, 2019 am 09:12 AM
vscodeoptimizationterminalset up

How to set up vscode terminal for optimization

What shell to use in the terminal

By default, on Windows 10 we will use PowerShell , and if it is a version below Win 10, the default Shell will be Cmd. VS Code under macOS and Linux will detect what your default shell is. For example, on my system, I use Zsh, and if it is not found, the terminal will use Bash or sh as the shell environment at startup.

If the Shell selected by VS Code is not what you want, then you can modify terminal.integrated.shell.windows, terminal.integrated.shell.osx or terminal.integrated.shell.linux, the value of this setting is the path of the Shell you want to use on the system.

The integrated terminal passes parameters to the Shell script when creating it

For example, when we want to create Bash in a Linux environment, use the login shell (login shell), Then we can change terminal.integrated.shellArgs.linux to -l to achieve this.

Environment variables

The third very commonly used integrated terminal setting is environment variables. We can either write environment variables into scripts or use terminal .integrated.env.osx, terminal.integrated.env.linux or terminal.integrated.env.windows to control which special environment variables should be used when the integrated terminal creates a shell. This setting can help you if you want to use different environment variables in VS Code and the system terminal.

In addition, the integrated terminal also learns many useful settings from various terminal emulators, such as terminal.integrated.cwd for controlling the initial directory when the Shell starts; terminal.integrated.rightClickBehavior controls the right mouse button Behavior when clicked; terminal.integrated.enableBell can control whether to make a sound when a script error occurs.

terminal.integrated.scrollback

When the terminal runs the script, it will only save the most recently output 1000 lines of results. Sometimes, when we run some tests, 1000 rows are simply not enough. After the test is finished, we want to page up to see the previous results, but we find that there are only 1000 rows and we cannot see all the results. Then we can change this setting to a higher value. For example, I changed this value to 5000.

The code implementation of the integrated terminal is still very good, so I am not worried at all that increasing this value will affect the overall performance of VS Code. Of course, if we feel that the output results in the integrated terminal are no longer needed, we can also press the shortcut key "Cmd K" to clear all output results.

Optimize the appearance of the terminal

In the picture below, we can easily see that my Shell is now in the vscode-sample folder, and at the same time this The project is version managed using Git. The current branch is master, and you can also see special symbols. Here I am using zsh and oh-my-zsh plug-ins, you can also try them. By the way, I use Posh-Git on Windows to achieve a similar effect.

How to set up vscode terminal for optimization

Recommended related articles and tutorials: vscode tutorial

The above is the detailed content of How to set up vscode terminal for optimization. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Visual Studio Professional and Enterprise: Paid Versions and FeaturesVisual Studio Professional and Enterprise: Paid Versions and FeaturesMay 10, 2025 am 12:20 AM

The difference between VisualStudioProfessional and Enterprise is in the functionality and target user groups. The Professional version is suitable for professional developers and provides functions such as code analysis; the Enterprise version is for large teams and has added advanced tools such as test management.

Choosing Between Visual Studio and VS Code: The Right Tool for YouChoosing Between Visual Studio and VS Code: The Right Tool for YouMay 09, 2025 am 12:21 AM

VisualStudio is suitable for large projects, VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive IDE functions, supports multiple languages, integrated debugging and testing tools. 2.VSCode is a lightweight editor that supports multiple languages ​​through extension, has a simple interface and fast startup.

Visual Studio: A Powerful Tool for DevelopersVisual Studio: A Powerful Tool for DevelopersMay 08, 2025 am 12:19 AM

VisualStudio is a powerful IDE developed by Microsoft, supporting multiple programming languages ​​and platforms. Its core advantages include: 1. Intelligent code prompts and debugging functions, 2. Integrated development, debugging, testing and version control, 3. Extended functions through plug-ins, 4. Provide performance optimization and best practice tools to help developers improve efficiency and code quality.

Visual Studio vs. VS Code: Pricing, Licensing, and AvailabilityVisual Studio vs. VS Code: Pricing, Licensing, and AvailabilityMay 07, 2025 am 12:11 AM

The differences in pricing, licensing and availability of VisualStudio and VSCode are as follows: 1. Pricing: VSCode is completely free, while VisualStudio offers free community and paid enterprise versions. 2. License: VSCode uses a flexible MIT license, and the license of VisualStudio varies according to the version. 3. Usability: VSCode is supported across platforms, while VisualStudio performs best on Windows.

Visual Studio: From Code to ProductionVisual Studio: From Code to ProductionMay 06, 2025 am 12:10 AM

VisualStudio supports the entire process from code writing to production deployment. 1) Code writing: Provides intelligent code completion and reconstruction functions. 2) Debugging and testing: Integrate powerful debugging tools and unit testing framework. 3) Version control: seamlessly integrate with Git to simplify code management. 4) Deployment and Release: Supports multiple deployment options to simplify the application release process.

Visual Studio: A Look at the Licensing LandscapeVisual Studio: A Look at the Licensing LandscapeMay 05, 2025 am 12:17 AM

VisualStudio offers three license types: Community, Professional and Enterprise. The Community Edition is free, suitable for individual developers and small teams; the Professional Edition is annually subscribed, suitable for professional developers who need more functions; the Enterprise Edition is the highest price, suitable for large teams and enterprises. When selecting a license, project size, budget and teamwork needs should be considered.

The Ultimate Showdown: Visual Studio vs. VS CodeThe Ultimate Showdown: Visual Studio vs. VS CodeMay 04, 2025 am 12:01 AM

VisualStudio is suitable for large-scale project development, while VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive development tools, such as integrated debugger, version control and testing tools. 2.VSCode is known for its scalability, cross-platform and fast launch, and is suitable for fast editing and small project development.

Visual Studio vs. VS Code: Comparing the Two IDEsVisual Studio vs. VS Code: Comparing the Two IDEsMay 03, 2025 am 12:04 AM

VisualStudio is suitable for large projects and Windows development, while VSCode is suitable for cross-platform and small projects. 1. VisualStudio provides a full-featured IDE, supports .NET framework and powerful debugging tools. 2.VSCode is a lightweight editor that emphasizes flexibility and extensibility, and is suitable for various development scenarios.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!