Background code recommendation tool

pyCharm

Download and install

The official download address: www.jetbrains.com/pycharm/dow…

PyCharm is the most convenient one I use so far, so I recommend it.

According to their own needs to choose the appropriate version of the download, money must be better. I had to go with the Comunity Community version, which had pretty much everything I needed. The installation process……. is ignored

The installation process can refer to: www.cnblogs.com/dcpeng/p/90…

Recommended Configuration Items

MAC configuration entry: pyCharm->Performances

1. Configure the Python file template to add # -*- coding: UTF-8 -*- by default when creating Pyton files. (python3 already supports Chinese characters.)

inspect CodeIt is recommended to set up the shortcut key, do the code check today, can find and solve the code problems in advance.

3. Perform the following shortcut operations (MAC environment, related shortcut keys may vary) :

  • View the source code
Hold down thecommand+ Click to enter the definition of a function or class. Read the source code to help you quickly understand the function of a variable or function.Copy the code
  • Code format

command+option+L to quickly clean up messy code, automatically indent and align (the new version of pyCharm uses PEP8 code style).Copy the code

During code writing, it is recommended to format the code frequently,

  • Look for files, classes, and methods throughout the project
command+shift+O Enter the keyword and name in the search box.Copy the code
  • Quick comment and uncomment
command+ /Copy the code
  • Quickly insert commonly used code
command+J can pop up frequently used method code, code template, select can be quickly inserted.Copy the code
  • Fast running and debugging
Control +R Fast run Control +D fast debugCopy the code
  • Find the current file contents and replace
command+R can find content, and batch modification.Copy the code
  • Select multiple lines
Hold down theshift+ up and down key to select multiple lines, and then TAB key to add multiple lines of indentation.Copy the code
  • Shrink and expand the code
command shift- Shrink all codecommand shift+ Expand the entire codecommand- Shrinks the current code blockcommand+ Expands the current code blockCopy the code
  • Look at the function call hierarchy
Hover the mouse cursor over the function name - click Navigate on the menu bar - click Call Hierarchy - and expand in the popup TAB to see the function's Call Hierarchy.Copy the code
  • View function documentation
Hover over the function name -- F1 to view the function definition documentCopy the code
  • View the parameter information of the calling function
When calling another function, if you forget what argument you need to pass in, you can just call itcommand+P gets the parameter hint.Copy the code
  • Search all content of the project
The Search Everywhere function is a hidden function of Pycharm and we need advanced behavior to give it shortcuts: Preference -- KeyMap -- Search "Search Everywhere" -- right click it, "Add Keyboard Shortcut" -- enter a combination of shortcuts that you haven't used before, like I used "Control +.commandAfter +S ", you can use this shortcut to call up the search box and enter the search content to find files, variables, classes, methods, and even Settings in your project.Copy the code
  • debugging
Break point at the file you want to debug - in the menu bar click: Run - Move to Debug, the option will pop up, select the file to Debug - click on the file to Debug, the file will Run - then in the lower Debugger page you can control the step execution of the program, and see the function stack frame and variable values within the function - Console TAB you can watch the Console output information.Copy the code
  • The name
If a file, function, class, method, or variable needs to be renamed, you can select the content to Rename, right-click -- Refactor -- Rename -- enter the new name, and Rename all references to the content.Copy the code

Refer to the above content:www.cnblogs.com/ygj0930/p/7…

  • Code review

Use shortcuts in the files you want to check to scan for errors and adjust the code according to the actual situation

The front-end tool

VisualStudio Code

Download and install

Download from code.visualstudio.com/

The installation process is ignored here, and several commonly used plug-ins are described below.

Configuring the Chinese Interface

1. Go to the extension page to search for Chinese and install the Chinese language package

configure display language

The plugin is recommended

1.Auto Close Tag: Automatically adds an HTML Tag

2.Auto Rename Tag: Changes a Tag automatically in pairs

3.Eslint: A code-checking tool that recognizes ECMAScript and reports on rules to avoid low-level errors and unify code styles. ESLint is designed to be fully configurable, and there are two main ways to configure ESLint

4.Prettier – JavaScript formatter: Formatting a file for easy viewing

5. In the Settings, it is recommended to configure automatic saving and automatic formatting codes when saving

The database

Navicat

Download and install

Official download address: www.navicat.com.cn/

Sqlite used in this project, Navicat can be very convenient to operate the database, you can directly open the DB file operation, the effect picture is as follows:

The next installment introduces the project structure