Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use VSCode plug-ins that improve development efficiency

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to use the VSCode plug-in to improve development efficiency. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

I believe that many students who are not good at English will often encounter words that they do not understand when they are typing the code. I also believe that when students write projects, they forget the interface of the frame and need to read documents online, ask online questions for help, and refer to examples of other projects. If you have ever encountered such problems, then believe that this VS Code plug-in can greatly help you. It allows you to search online / offline in the code. Or translated.

Use

To introduce the simple use process, you can search for Search/Translate Hero in VS Code and click install, or you can download it here:

Https://marketplace.visualstudio.com/items?itemName=Wscats.search

If you are using a domestic Hbuider editor, you can click here to download:

Https://ext.dcloud.net.cn/plugin?id=3557

Search

First of all, the first and most important function is search. As developers, we can't type code without search every day. When you encounter a library that you don't understand in the process of writing code, such as require ('react'), you can select the keyword react in the code in the editor, then right-click, select the Search Online menu item in the menu panel that appears, and the plug-in will automatically open the default browser for you. And search for corresponding keywords and display search results.

Of course, you can also select the corresponding keyword, use the shortcut key cmd+enter (mac) / ctrl+enter (win) to open the browser to search, this will be more efficient, no longer need to switch the screen to the browser, enter the search URL to type the keyword and then search.

Translation

Good news for students who are not good at English, when you encounter words that you do not understand in the code, you can select the corresponding keywords in the code in the editor, then right-click, select the Traslate Online menu item in the menu panel that appears, and the plug-in will automatically help you open the default browser and enter Google Translation search to search for the translation results of the corresponding keywords.

You can also select the corresponding keyword and use the shortcut key cmd+shift+enter (mac) / ctrl+shift+enter (win) to open the browser for translation.

The offline dictionary library provided by the offline English-Chinese Dictionary (https://github.com/program-in-chinese/vscode_english_chinese_dictionary) plug-in is also used here, so the search of the offline dictionary is supported, and the same operation is the same as above. Select the keywords in the code, and the translation results will appear in the lower right corner of the bottom column. Simple translation does not need to consult Baidu and Google frequently. Display the results at the bottom, convenient and clear. If you want to see more detailed translation results, you can click on the Chinese translation results in the lower right corner of the bottom column, which will open your default browser for online translation.

Switch search engines

If you have other special needs, you can switch between different search engines, just click Search Engine on the right side of the bottom bar of the editor, and then select the search engine you want in the pop-up options.

You can also select the Search Online By Switch Engine menu item in the right-click menu bar and directly switch to the corresponding search engine to search.

If the default search engine address is not suitable for your use, you can update the search engine address manually and set it in the plug-in's Extesion Settings.

The default search engine address format is as follows:

Note: use% SELECTION% to replace keywords selected by search engines

EngineUrlGoogle https://www.google.com/search?q=%SELECTION%Binghttps://www.bing.com/search?q=%SELECTION%Githubhttps://www.github.com/search?q=%SELECTION%Baiduhttps://www.baidu.com/search?q=%SELECTION%Npmhttps://www.npmjs.com/search?q=%SELECTION%Yahoohttps://search.yahoo.com/search?p=%SELECTION%Wikihttps://wikipedia.org/wiki/%SELECTION%Duckhttps://duckduckgo.com/?q=% SELECTION%Code Pen https://codepen.io/search/pens?q=%SELECTION%Code Sandbox https://codesandbox.io/search?query=%SELECTION%

For example, you can type a search engine for a color website, and you can enter the sage mode at any time by typing the code (manually funny).

Hum, you can also modify the .vscode / setting.json file to set the default search engine, for example, change the configuration parameter of search-online.search-engine to Bing, you can use Bing as the default search engine.

{"search-online.search-engine": "Bing"}

Additional search engines can be added by changing the configuration parameters of the search-online.add-search-engine in the .vscode / setting.json file.

{"search-online.add-search-engine": [{"name": "Visual Studio Marketplace", "url": "https://marketplace.visualstudio.com/search?term=%SELECTION%&target=VSCode"}, {" name ":" Pypi "," url ":" https://pypi.org/search/?q=%SELECTION%"}]}}

If you find the above operations troublesome, you can also add search engines through the visual interface. Click ➕ Add Search Engine at the bottom of the switch engine panel, and then two input boxes will appear. Fill in the following contents respectively to add the search engine ↓.

Name: Visual Studio Marketplace

Url: https://marketplace.visualstudio.com/search?term=%SELECTION%&target=VSCode

With these, you can search for relevant code on Github with one click, search for relevant toollibraries in Npm, search professional entries in Wiki, leave your secret in Duck Duck Go, and paste a few small codes in Code Pen. In short, it is unreasonable and unvirtuous.

Switch translation engine

In general, you can change the language to be translated in the settings panel. The default setting is to translate from English to Chinese.

But if you encounter two situations, such as code and comments written by Russians, and you want to translate them, then you can switch the translation engine to the setting of Russian-to-Chinese translation, which supports online translation in most languages in the world. Google translation is a good thing, and the support of Baidu translation engine will be increased in the future.

On how to use VSCode plug-ins to improve development efficiency is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report