Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Visual Studio Code- add or remove comment lines in batch

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

For example, delete Visual Studio code or notepad++ comment messages in batches to facilitate reading valid code or text information. The specific operations are as follows:

Visual Studio Code batch delete comment line information:

In VS Code, we can use the Ctrl+h shortcut to call up the replacement interface, enter the regular expression ^ # corresponding to the blank line in the replacement lookup interface, and Alt+R select the corresponding regular expression search mode, and replace the batch with empty to clear the comment line information, as shown below:

1. Quickly open the replacement interface and enter ^ # in the Find interface. *

2.Alt+R selects Use Regular _ Expression (Alt+R), which is the regular expression pattern:

3. Select Replace All (Ctrl+Alt+Enter) to replace in batch to complete the operation. The screenshot is as follows:

If there is a space in front, you can add the corresponding space to replace it.

Visual Studio Code adds comments in batches:

Using shortcut keys, the default is as follows, and we can also customize it in the options interface:

Batch comments: Ctrl+K,Ctrl+C

Uncomment: Ctrl+K,Ctrl+U

Notepad++ batch delete comment line information:

Method 1: regular expression: ^ #. *

Method 2: graphical interface operation:

Notepad++ batch add comment line information:

Welcome to the official account of Wechat: Xiao Wen study Society.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report