preface
By the end of this article, you will have learned these common operations for real development
-
Quick generation of header annotations and function annotations in vscode (koroFileHeader)
-
Don’t know how to name it, open the codeIf site (useful for some of you) and implement it in sublime and vscode respectively
-
When you encounter translation problems, you may be used to Baidu Translation or Youdao Translation, or even specially install translation software, which can be solved in the editor. Translate plug-ins (Yao-Translate) and Translate,Translate-CN are used in VScode,sublime,IDEA respectively
KoroFileHeader annotation
Quickly add header comments or function comments to the file
- Click on the app store icon in the left-hand toolbar in vscode to search for koroFileHeader installs directly
- Review the koroFileHeader usage documentation (this is important, as is the use of other similar plug-ins)
- Customize the header to configure the information you want, click the plug-in, enter the configuration, configure the extended Settings (there are two ways to enter, as shown below)
- If your vscode is in English and you find it difficult to read English, you can also download the Chinese plug-in in the store to expand and operate the Chinese version according to the document
ctrl+shift+p--->config
–> Configure the display language –> select the language you want to display
- Header comment and function comment personalization configuration in
FileHeader Cursor Mode
withcustom Made
, click onsettings.json
, can be done for header file comments and function comments respectively
Separate the bottom onesfileheader.customMadewithfileheader.cursorMode, to your configuration, personalized configuration
"fileheader.customMade"{// This is a header comment"LineStart": "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --"."Copyright": "© 2020, itclanCoder. All rights reserved."."LineEnd": "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -"."Product": ""."Mode Name": ""."Autor": "vxPublic:itclanCoder"."Date": "Do not edit"."Version": "XXX. V1.0"."LastEditors": "Chuan chuan"."LastEditTime": ""."Description": "",},"fileheader.cursorMode"{// This is a function comment"description":"Detailed description of function functions"."param": ""."return": ""."author":"itclanCoder"
}
Copy the code
CTRL + Alt + I (to generate header comments) and CTRL + Alt + T (to generate function comments) in the code edit area, respectively.
SublimeText3 generates comments quickly
SublimeText is a very lightweight tool and a very cool code editor for anyone who loves to mess with editors before vscode came along
How do I also generate header comments
ctrl+shift+p
—->install Package
—>DocBlockr
SublimeTmpl (create various templates)
preferences
—>package settings
—>sublimeTmpl
—>setting default
Add the following to your editor and customize it yourself
"attr": {
"LineStart":"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --"."Copyright": "© 2020, itclanCoder. All rights reserved."."LineEnd":"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -"."Product":""."ModeName":""."Version": ""."author": "vxPublic:itclanCoder"."LastEditors": "Chuan chuan"."email": "[email protected]"."link": "http://example.org"."Description":""
}
Copy the code
Add the fields you want to add, and then Browse Packages in the menu bar find SublimeTmpl and open the corresponding file to make the changes, for example :js.tmpl
/ * * *The ${1}
* @LineStart ${LineStart}
* @Copyright ${Copyright}
* @Product ${Product}
* @ModeName ${ModeName}
* @authors ${author} (${email})
* @date ${date}
* @version \$Id\$
* @link ${link}
* @LastEditors ${LastEditors}
* @Description ${Description}* /$0
Copy the code
When you create xxx.js after you’ve done the above, the header file will generate the given comment
For more on sublimeText, you can poke the link to sublimeText3 on the code to have love
CodeIf variable named artifact
Codeif is a variable naming site that provides examples for naming when you type in Chinese or English. This site may be useful for those who are struggling with naming
unbug.github.io/codelf/
- If you can’t remember the name of the website, it is very troublesome to have to open this website every time
vscode
As well assublimeText
The former allows you to install codeIf in the plugin marketplace, while the latter does not provide online plug-in installation but can be installed locally
- in
sublimeText
, enter thepackages
Download the installation package from the folder and rename it ascodeIf
Then it’s ready to use
Yao-Translate and Translate plug-ins
Whether it is reading code or naming variables, once it comes to English, you may habitually go to Youdao Translation, or Baidu Translation, or even install a translation tool on your computer, open the translation, or use the browser translation plug-in
These methods do work, but the faster and more direct way is to do it in the code editor, which takes a lot of time and energy to chop through multiple processes
Translate
-
Install Translate in VSCode (to use this, you need to go to Youdao Wisdom Cloud to obtain the key for configuration)
-
Go to translate’s configuration Settings and you’ll find that you need to fill in the key, which goes to http://ai.youdao.com, where you can register for the key
-
Open the official website of Youdao Wisdom Cloud, register an account, and enter the management background to obtain the key
- Select Chinese or English in vscode, CTRL +6 directly, and see if there is a translation result under the console. If there is, the installation is complete and correct, and both Chinese and English can be translated
Do not feel the above configuration is very troublesome, trouble once, it is once and for all, in also do not have to download what translation software tools or open Baidu translation, Youdao translation, directly in the code editor can translate each other
Yao-Translate
Vscode is popular largely because of its rich third-party open source plug-ins, easy to install, complete documentation, do not love it, you can try some auxiliary plug-ins
The yao-Translate plugin is also useful
- Select the text and press
ctrl+shift+T
To translate, select the text and pressctrl+shift+R
It’s intertranslate and replace, which is useful sometimes when you’re translating fields instead
Translation plugin in sublimeText
- in
sublimeText3
Online InstallationTranslate-CN
Can the
Select the English word, then right-click translate-cn –current Text/input Text
IDEA translation plugin
Sometimes, some front-end projects need to rely on the start of some background services to run, and IDEA tool for Java students, is not strange, this tool is also quite powerful
More IDEA can be used baidu encyclopedia, can write several articles alone, here only a real-time translation
- Click on File and go to Settings
- Find plugins, then browse plug-ins and search for Translation to install
- in
Tools
Under theTranslation
To set the key, and then restartIDEA
- Click the translation icon on the right of the MENU bar of IDEA, which is very convenient and can be translated in real time regardless of Chinese and English
conclusion
This section mainly introduces some tools that can be used in the actual development, tools still need to use, the original tools also need to know, advanced tools also need to contact, sometimes to try more, will give yourself a lot of surprises when I find the efficiency is very low, there is a better and faster way to solve the current problem
For example, codeIf seems to give you a better reference when you encounter naming headaches. When you need to translate, some of you are used to Baidu translation or Youdao Translation, or even install a translation software on your computer specially
These primitive actions do solve the problem, but you’ll find that bouncing from one application to another takes a lot of energy
There must be someone in today’s awesome code editors who has solved this problem, and there must be a similar solution in every editor
Try a new way to work, and sometimes you’ll find that you can
Hope the above shared content for some friends useful ~