vscode set comment code block/vscode custom comment code block

1. Install the plugin KoroFileHeader
Insert picture description here
2. Find the settings
file in the preferences -> Preferences -> Settings -> input fileheader
Insert picture description here
3. Set the comment block according to your needs.
Example: I chose the second function setting

  • After clicking settings.json, it will jump to settings.json and automatically generate "fileheader.cursorMode"
  • Directly inside "fileheader.cursorMode", install the plugin KoroFileHeader
    Insert picture description here2. Find the settings file in the preferences -> Preferences -> Settings -> input fileheaderInsert picture description here3. Set the comment block example according to your needs: I chose the first Two function settings-after clicking settings.json, it will jump to settings.json and automatically generate "fileheader.cursorMode"-directly customize the comment template inside "fileheader.cursorMode"
 "fileheader.cursorMode": {
    
    
        "author": "yx",
        "method": "",
        "param": "",
        "Date": "Do not edit",
        "return": ""
  },

Insert picture description here
4. Use notes

  1. File header note:
    shortcut keys: crtl+alt+i (window), ctrl+cmd+t (mac)
  2. Function notes
    Shortcut keys: ctrl+alt+t (window), ctrl+alt+t (mac)

Guess you like

Origin blog.csdn.net/qq_25992675/article/details/106187251