vscode开发环境

原创
2019/03/27 14:17
阅读数 110

通用插件

Chinese (Simplified) Language Pack for Visual Studio Code #中文语言包
sftp #sftp
Git History #查看git历史
Beautify # 更好看

sftp基本配置 .vscode/sftp.json

{
  "name": "develop",
  "host": "ip",
  "protocol": "sftp",
  "port": 22,
  "username": "un",
  "password": "pwd",
  "remotePath": "/home/wwwroot/default/",
  "uploadOnSave": true,
  "watcher": {
    "files": "**/*",
    "autoUpload": true,
    "autoDelete": false
  },
  "ignore": [
    ".vscode",
    ".git",
    ".DS_Store",
    "node_modules",
    "dist",
    ".svn"
 ]
}

php插件

PHP Extension Pack #php扩展包
PHP IntelliSense #代码提示和跳转
PHP Debug #xdbug
phpcs # 代码规范检查工具
vscode-php-cs-fixer #自动格式化
PHP DocBlocker #php函数doc
PHP Phan(Analyzer) #php静态分析

配置C:\Users\Administrator\AppData\Roaming\Code\User\settings.json

php-cs-fixer.phar该文件从[https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases)下载

{
    "php.validate.executablePath": "D:\\Program Files\\php\\php.exe",
    "php.validate.run": "onType",
    "php-cs-fixer.executablePath": "D:\\Program Files\\php\\php-cs-fixer.phar",
    "php-cs-fixer.lastDownload": 1552984659304,
    "php-cs-fixer.onsave": true
}

其他php插件推荐

Better PHPUnit #单元测试

javascript

ESLINT #代码风格
Prettier - Code formatter #代码格式化
Vetur #vue插件
NPM-Scripts #npm命令

安装nodejs和安装以下包

npm install -g eslint
npm install -g eslint-plugin-html
npm install -g eslint-plugin-vue
npm install -g eslint-config-standard
npm install -g eslint-plugin-import
npm install -g eslint-plugin-node
npm install -g eslint-plugin-promise
npm install -g eslint-plugin-standard
npm install -g babel-eslint

配置C:\Users\Administrator\AppData\Roaming\Code\User\settings.json

{
  "editor.formatOnSave": true,
  "eslint.autoFixOnSave": true,
  "eslint.validate": [
    "javascript",
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  "prettier.eslintIntegration": true,
  "prettier.semi": false,
  "prettier.tabWidth": 2,
  "prettier.singleQuote": true,
  "vetur.format.defaultFormatter.js": "vscode-typescript"
}

其他插件

SVN

需要安装svn客户端

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部