Astyle的bin路径要加入系统环境变量
安装好插件后VScode设置
{
/* AStyle */
"astyle.additional_languages": [
"c",
"cpp",
"*.h",
],
"astyle.cmd_options": [
// 预定义风格 -----------------------------------------------------------
"--style=ansi", //ANSI 风格格式和缩进
// "--style=kr", //Kernighan&Ritchie 风格格式和缩进
//"--style=linux", //Linux 风格格式和缩进
//"--style=gnu", //GNU 风格格式和缩进
// "--style=java", //Java 风格格式和缩进
"--indent=spaces=4", //缩进4个空格
"--indent-preproc-block",
"--pad-oper", //操作符两端插入一个空格
"--pad-header",
"--unpad-paren",
"--suffix=none",
"--align-pointer=name",
"--lineend=linux",
//"--convert-tabs", //TAB转换为空格
"--verbose",
// "--delete-empty-lines", //删除多余空行
"--pad-paren-in", //括号内部加入空格
"--unpad-paren", //移除括号两端多余空格
],
"workbench.colorTheme": "Atom One Light",
"editor.tabSize": 2, //工作台主题颜色
"typescript.updateImportsOnFileMove.enabled": "always", // 开启 vscode 文件路径导航
// "tslint.autoFixOnSave": true, // #每次保存的时候将代码按tslint格式进行修复
"eslint.autoFixOnSave": true, // #每次保存的时候将代码按eslint格式进行修复
// "prettier.semi": false,//prettier 设置语句末尾不加分号
"prettier.singleQuote": true, // prettier 设置强制单引号
"vetur.format.defaultFormatter.js": "vscode-typescript", // #让vue中的js按编辑器自带的ts格式进行格式化
"window.enableMenuBarMnemonics": false,
"liveServer.settings.donotShowInfoMsg": true,
// "workbench.colorTheme": "Winter is Coming (Light)", //窗口.不启用菜单栏输入法,修改主题配色
"workbench.colorCustomizations": { // 颜色设置
"editor.background": "#C7EDCC",
//"editor.selectionHighlightBackground": "#f5f113",//选中代码高亮颜色
//"editor.selectionBackground": "#f5f113",//选中区域背景色
"sideBar.background": "#C7EDCC",
"terminal.background": "#82e08f"
},
"editor.tokenColorCustomizations": {
"[Atom One Light]":{
"comments": "#043cf5",//注释
//"strings": "#7e3648",//字符串
"functions": "#367a33",//函数
//"keywords": "#a207fc",//关键字
//"variables": "#e21d1d",//变量
//"numbers": "#e21d1d",//数字
/*"textMateRules":[
{
"name": "Operator",
"scope": "keyword.operator",
"settings":{
"foreground": "#e21d1d",
"fontStyle": "bold"
}
},
{
"name": "Punctuation",
"scope": "punctuation",
"settings":{
"foreground": "#a207fc",
"fontStyle": "bold"
}
}
]*/
}
},
"files.autoGuessEncoding": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"extensions.ignoreRecommendations": true,
"window.zoomLevel": 0,
"workbench.editor.enablePreview": false,
"window.title": "${dirty}${activeEditorLong}${separator}${rootName}${separator}${appName}",
"workbench.statusBar.visible": false
}
参照如下两个网址
http://www.360doc.com/content/17/1120/16/41190201_705592128.shtml
http://nicethemes.cn/news/txtlist_i37053v.html