In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the method of vscode setting terminal optimization, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
What kind of Shell is used in the terminal
By default, we will use PowerShell on Windows 10, 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, you can modify terminal.integrated.shell.windows, terminal.integrated.shell.osx, or terminal.integrated.shell.linux, which is the path of the Shell you want to use on the system.
The integration terminal passes parameters to the Shell script when it is created
For example, when we want to create Bash in Linux environment, we can use login Shell (login shell), then we can change the terminal.integrated.shellArgs.linux to-l.
Environment variable
The third very common integrated terminal setting is the environment variable. We can either write the environment variable into the script, or use terminal.integrated.env.osx, terminal.integrated.env.linux or terminal.integrated.env.windows to control which special environment variable should be used when the integrated terminal creates the Shell. If you want to use different environment variables in VS Code and system terminals, this setting will help you.
In addition, the integrated terminal also learns many useful settings from various terminal simulators, such as terminal.integrated.cwd to control the initial directory when Shell starts; terminal.integrated.rightClickBehavior to control the behavior when the right mouse button is clicked; and terminal.integrated.enableBell to control whether to make a sound when the script goes wrong.
Terminal.integrated.scrollback
When the terminal runs the script, it saves only 1000 lines of the most recent output. Sometimes, when we run some tests, 1000 lines are simply not enough. When the test is finished, we want to turn up the page to see the previous results, only to find that there are only 1000 lines, so we can't 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 at all worried that increasing this value will affect the overall performance of VS Code. Of course, if we feel that the output in the integrated terminal is no longer needed, we can also press the shortcut key "Cmd + K" to clear all the output.
Optimize the appearance of the terminal
In the following figure, we can easily see that my Shell is now under the vscode-sample folder, while this project is versioned using Git, the current branch is master, and you can see special symbols. Here I use the zsh and oh-my-zsh plug-ins, you can also try. By the way, I will use Posh-Git on Windows to achieve a similar effect.
The above is all the content of this article "how to set up the terminal for optimization in vscode". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.