Home > Development Tools > VSCode > body text

How to comment method code block in vscode

王林
Release: 2020-02-11 11:42:19
Original
9837 people have browsed it

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))
        })
    }
}
Copy after login

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))
        })
    }
} */
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template