磨刀不误砍柴工,好的编辑器和主题能够让你的代码敲起来更加的流畅,视觉效果更加舒适,所以分享一下我的Vscode编辑器配置状态
在 Vscode 扩展商店中搜索koroFileHeader,用于块级注释函数以及文件头部注释,
在用户设置中配置如下信息
"fileheader.cursorMode": { // 函数信息体注释
"name":"qw", // 声明人或函数名
"test":"", //
"msg":"", // 描述
"param":"", // 参数信息
"return":"" // 返回值
},"fileheader.customMade": { // 文件头部注释
"Author":"missQ", // 声明人
"Date":"Do not edit", // 创建时间
"LastEditors":"OBKoro1", // 最后编辑人
"LastEditTime":"Do not edit", // 最后编辑时间
"Description":"file content", // 函数描述
"Company":"ZJ" // 公司名
},页面快捷键
函数信息体注释,鼠标光标放在class 或 funtion上 =^=^=> ctrl+alt+t
文件头部注释, =^=^=> ctrl+alt+i
JS注释快捷键 双斜杠//注释 =^=^=> ctrl+/ , /**/注释 =^=^=> shift+alt+a"window.zoomLevel": 1,
"editor.wordWrap": "on", // 自动换行
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},//react的jsx语法支持
背景图设置:
"workbench.colorTheme": "Monokai",
"update.enableWindowsBackgroundUpdates": true,
"background.customImages": ["file:///f:/bm1.jpg"], // 路径
"background.enabled": true,
"background.style":{ // 样式
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
"width": "100%",
"height": "100%",
"background-position": "center",
"background-repeat": "no-repeat",
"background-attachment":"fixed",
"background-size": "cover",
"opacity": 0.25,
// "object-fit":"fill",
}
,
"background.useFront":false ,
"background.useDefault": false,
"breadcrumbs.enabled": true,
"workbench.colorTheme": "Monokai", // 主题
"editor.tokenColorCustomizations": {
"comments": "#b96236", // 注释
"keywords": "#fa9717", // 关键字
"variables": "#29dff7", // 变量名
"strings": "#07a1a7bd", // 字符串
"functions": "#5b91e7c9", // 函数名
"numbers": "#AE81FF" // 数字
},
// 选中高亮的颜色
"workbench.colorCustomizations": {
"editor.selectionBackground": "#8d6641",
}
vue模板速建,点击vscode左上角文件中的首选项==>用户代码片段,搜索vue.json配置如下:
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>",
" $0",
" </div>",
"</template>",
"",
"<script>",
"",
" export default {",
" name:'',",
" props:[''],",
" data () {",
" return {",
"",
" };",
" },",
"",
" components: {},",
"",
" computed: {},",
"",
" created() {},",
"",
" mounted() {},",
"",
" methods: {},",
"",
" watch: {}",
"",
" }",
"",
"</script>",
"<style lang='' scoped>",
"",
"</style>"
],
"description": "Log output to console"
}
}vscode版本更新,重新走了配置,如下:
{ "window.zoomLevel": 0, "editor.wordWrap": "on", // 自动换行 "fileheader.cursorMode": { // 函数信息体注释 "name": "qw", // 声明人或函数名 "describe": "", // 描述 "param": "", // 参数信息 "return": "" // 返回值 }, "fileheader.configObj": { "autoAdd": false, }, /* "fileheader.customMade": { // 文件头部注释 "Author": "missQ", // 声明人 "Date": "Do not edit", // 创建时间 "LastEditors": "OBKoro1", // 最后编辑人 "LastEditTime": "Do not edit", // 最后编辑时间 "Description": "file content", // 函数描述 "Company": "GRKJ" // 公司名 }, */ // "files.associations": {"*.html": "php"}, // 可运行php文件到浏览器 "update.enableWindowsBackgroundUpdates": true, "background.customImages": [ "file:///f:/bm3.jpg" ], // 路径 "background.enabled": true, "background.style": { // 样式 "content": "''", "pointer-events": "none", "position": "absolute", "z-index": "99999", "width": "100%", "height": "100%", "background-position": "center", "background-repeat": "no-repeat", "background-attachment": "fixed", "background-size": "cover", "opacity": 0.15, // "object-fit":"fill", }, "background.useFront": false, "background.useDefault": false, "breadcrumbs.enabled": true, "workbench.colorTheme": "Beed-theme", // 主题 "editor.tokenColorCustomizations": { "comments": "#b96236", // 注释 "keywords": "#fa9717", // 关键字 "functions": "#0ccf47c9", // 函数名 "variables": "#0ea7d6", // 变量名 /* "variables": "#29dff7", // 变量名 "strings": "#07a1a7bd", // 字符串 "functions": "#5b91e7c9", // 函数名 "numbers": "#AE81FF" // 数字 */ }, "[html]": { "editor.defaultFormatter": "vscode.html-language-features" }, "files.autoSave": "off", // 选中高亮的颜色 "workbench.colorCustomizations": { "editor.selectionBackground": "#333231", }, // 修改字体 "editor.fontFamily": "Axure Handwriting, 'Courier New', monospace,华文新魏", // 字体大小 "editor.fontSize": 17, // PHP断点调试 "php.validate.executablePath": "F:\\phpStudy.exe", }