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

How to comment method code block in vscode

王林
王林 Original
2020-02-11 11:42:19 9763browse

How to comment method code block in vscode

Alt is the option key on mac.

Comments on the method block:

1. Install the plug-in Document This

2 in vscode. 2. Place the cursor on the function. The shortcut key is Ctrl Alt D plus Ctrl Alt D

/** *网络请求 * * @export * @class HttpUtil */ export default class HttpUtil { static get(url) { return new Promise((resolve,reject)=>{ fetch(url) .then(response=>response.json()) .then(result=>resolve(result)) .catch(erro=>reject(error)) }) } }

Multi-line comments: [alt shift A]

/* export default class HttpUtil { static get(url) { return new Promise((resolve,reject)=>{ fetch(url) .then(response=>response.json()) .then(result=>resolve(result)) .catch(erro=>reject(error)) }) } } */

Recommended related article tutorials:vscode tutorial

The above is the detailed content of How to comment method code block 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