Problem Description
-
There is a space at the end of the code line, which affects the cleanliness and beauty of the code. Manually searching and deleting it will waste a lot of time and energy.
-
When using VS Code, there is an option to delete the spaces at the end of the line when the file is automatically saved [blank character]
-
After verification, it feels very useful, you can set it up
How to automatically remove spaces at the end of a line
- Set [Settings] to enter in the search bar:
Files: Trim Trailing Whitespace
, you can enter some characters to filter out some other options.
-
After this setting, if there is a space at the end of the line in the code file, it will be automatically deleted when saved, which is more convenient.
-
If you are worried about accidentally deleting characters, you can turn off the option to automatically delete spaces at the end of the line [uncheck]
summary
-
The editing function of VS Code code is relatively powerful and can be used for software development
-
Reasonably setting some function options can improve the efficiency of code entry, make the code look neat and beautiful, and save time and effort