Home > Article > Development Tools > 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!