1. Remove comments
- Extension via vscode store Remove Comments Remove comments.
Just copy-pasted some code from somewhere and it’s obscenely documented with unnecessary comments everywhere? Remove Comments will help you undocument the code and remove all the comments present in the code by doing the job for you.
- Ansou
Left side Exhibition: Shop Search inside Remove Comments 并Point击 Anso.
- Use
to open the specified page, keyboardctrl+shfit+p to open the command line, search a>Remove All Comments and select Enter to remove comments on the specified page.
Note: This function currently supports comment removal in more than 60 languages. Inline comments//
and multi-line comments/* */
will be completely deleted.
- Delete by regular matching
- ctrl+h Open the replacement function box, select [.*] For regular matching, enter < /span>
^\s*(?=\r?$)\n
, when matching comments, can be replaced individually or globally.
2. Join Lines
Join Lines is one of the functions provided by vscode, which can directly merge specified codes into one line.
- Use
Select the specified area code with the mouse cursor or keyboardctrl+a Select all codes, keyboard ctrl+shfit+p Open the command line, search Join Lines and return You can combine the specified code into one line.
Note: Be sure to remove the inline comments//
before merging a line, otherwise the code will be commented! ! !
3. Minify code compression
Extended through vscode store Minify Compress code, support html, css, js compression.
Minify your js, css and html files to save transmit bandwidth.
- Ansou
Left side Exhibition: Shop Search inside Minify并Point击Anso.
- use
Need to reload after installation, select the specified file, keyboard F1 when the command line appears, select Minify and press Enter.
The min.js file will be automatically generated as a result, and you can re-cite it for debugging.