Home  >  Article  >  Development Tools  >  How to comment code in vscode

How to comment code in vscode

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-12-07 11:34:1835999browse

How to comment code in vscode

Using Django’s three lines of code as an example:

How to comment code in vscode

1. Single-line comments: (Comment the first line of code )

1. Place the cursor before the first letter, shift #, and cancel the same.

How to comment code in vscode

#2. Place the cursor anywhere in the first line (either in the middle or at the end of the sentence), press ctrl /, and the same applies to cancel.

How to comment code in vscode

#3. Select a line of code you want to comment with the cursor, alt shift A, cancel the same.

How to comment code in vscode

4. Select a line of code you want to comment with the cursor:

(1) ctrl k;

(2) ctrl c .

Cancel is:

(1) ctrl k;

(2) ctrl u.

How to comment code in vscode

2. Multi-line comments: (comment multiple lines of code)

1. Select all the codes you want to comment with the cursor. ctrl /, cancel the same.

How to comment code in vscode

#2. Select all the codes you want to comment with the cursor, alt shift a, cancel the same.

How to comment code in vscode

3. Select all the codes you want to comment with the cursor:

(1) ctrl k;

(2) ctrl c.

Cancel is:

(1) ctrl k;

(2) ctrl u.

How to comment code in vscode

PHP Chinese website has a large number of free vscode introductory tutorials, everyone is welcome to learn!

The above is the detailed content of How to comment code in vscode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn