First, Introductionnotepad++ is often used when writing code, and if notepad++ is not configured, there are often indentationerror errors due to whitespace and tab formatting problems.
Second, the configuration methodIndentation Issues
- Click Settings , preferences, and other settings
- After checking this, you will automatically indent if you change the line, and set the tab change to the 4 Space Settings, tab settings.
Run Environment Configuration1. Run the notepad++ and select "Run";
2. Fill in the popup window: cmd/k CD "$ (current_directory)" & Python "$ (full_current_path)" & ECHO. & PAUSE & EXIT;
cmd/k python: opens the cmd window, runs the command behind/k, and retains the window after execution is complete. This is Python (because the Python directory has been added to the environment variable, so it is not necessary to specify a directory for the Python program, which can be found directly)
$ (current_directory): a macro definition of notepad++ that represents the directory where the current file resides.
$ (full_current_path): A macro definition of notepad++ that represents the absolute path to the current file.
& used to connect more than one command
ECHO: line break
Pause
: indicates a pause after running (cmd displays "Press any key to continue ..."), waiting for a key to continue
EXIT: indicates "Press any key to continue ..." to close the command line window.
3. If the run succeeds click Save, fill in the name of the command (optional): Run Python;
4. Define the shortcut keys for this command (be careful not to conflict with existing shortcuts), save it. Then select "Run" and find out the "Run Python" item.
notepad++ Configuring the Python development environment