Vscode plug-in offline installation tutorial + Chinese plug-in installation failure solution

Zero. My VSCode plugin

Vetur
korofileheader
less  sass
chinese language
auto rename tag
auto close tag
Mithril Emmet
Debugger for Chrome
HTML CSS Support
vscode-icon
Path Intellisense
ESlint
Prettier
EditorConfig for VS Code

1. Download the offline plug-in

Official plug-in website: https://marketplace.visualstudio.com/vscode
You can search through the search bar.
For example, to search for Chinese plug-ins, click to enter the result page, click Download Extension to download

insert image description here

insert image description here

2. Offline installation of plug-ins

1. The first step: copy the plug-in

Put the offline package into the Bin directory of VsCode
insert image description here

2. The second step: Execute the command (both ways are available)

The first way: through the command

在命令行中输入下面的语句
code  --install-extension  xxxxxxx.vsix

出现以下语句即为成功
Extension ‘xxxxx.vsix’ was successfully installed!

The second way: directly find the vsix file

insert image description here
insert image description here

3. Chinese plug-in installation failure solution

Note: Do not modify the suffix to .zip or other formats, otherwise after you modify the configuration, if you change to the vsix format, there will be a problem that the package.json file will not be recognized

1. Step 1: directly open the vsix file through 360 compression or other compression software

insert image description here

2. The second step: modify the configuration file

Explanation: This attribute is a restriction on the Vscode version
2.1: Enter the extension directory, open the package.json file
2.2: As shown in Figure 1, my current Vscode version is 1.48.2, then modify the vscode value of the engines in the package and json file 1.48.0
For example, if yours is 1.47.2, then the vscode value is 1.47.0, that is, only look at the major version number, and so on.
2.3: After the modification is completed, save it, then execute the command installation or directly search for the vsix file
Figure 1:
insert image description here

Figure II:
insert image description here

4. Self-use setting.json configuration

{
    
    
  "editor.fontSize": 16,
  "editor.formatOnType": true,
  "editor.formatOnSave": true,
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatterOptions": {
    
    
    "js-beautify-html": {
    
    
      "wrap_attributes": "auto",
      
    }
  },
  "editor.codeActionsOnSave": {
    
     "source.fixAll.eslint": true },
  "files.associations": {
    
    
    "*.jsx": "javascriptreact"
  },
  //配置新建文件注释和方法注释
  "fileheader.configObj": {
    
    
    "createFileTime": true, // 设置为true则为文件新建时候作为date,否则注释生成时间为date
    "autoAdd": false, // 自动生成注释
    "annotationStr": {
    
    
      "head": "/*",
      "middle": " * @",
      "end": " */",
      "use": true // 设置自定义注释可用
    },
    "headInsertLine": {
    
    
      "php": 2
    }
  },
  "fileheader.cursorMode": {
    
    
    "description": "",
    "param ": "",
    "return": ""
  },
  "fileheader.customMade": {
    
    
    "Description": "", // 文件内容描述
    "Author": "r_yuesheng", // 编辑人
    "Date": "Do not edit", //时间
    "LastEditTime": "Do not edit",
    "LastEditors": "r_yuesheng",
  },
  // "[vue]": {
    
    
  //   "editor.defaultFormatter": "octref.vetur"
  // },
  "vetur.validation.template": false,
  "editor.fontLigatures": null,
  "[javascript]": {
    
    
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    
    
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[vue]": {
    
    
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    
    
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "security.workspace.trust.untrustedFiles": "open",
  "[javascriptreact]": {
    
    
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
}

If it is helpful to you, I hope you can click three times, hahaha!

Guess you like

Origin blog.csdn.net/r657225738/article/details/108460875