目录:
1、背景图片
2、快捷键
正文:
1、背景图片
-
1.以管理员身份运行VS Code,安装background插件
-
2.打开设置,在搜索框中输入background,选择扩展中的plugin background,选择在setting.json中编辑
-
3.在用户设置中输入以下代码,修改完后按Ctrl+S保存,会提示重启VS Code,点击确定后即可完成修改
// 整个文件
{
// #每次保存的时候自动格式化
"editor.formatOnSave": true,
"emmet.syntaxProfiles": {
"javascript": "jsx",
"vue": "html",
"vue-html": "html"
},
"editor.fontSize": 14,
"files.associations": {},
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html"
},
"editor.minimap.enabled": false,
"update.enableWindowsBackgroundUpdates": true,
"background.customImages": [
"file:///D:/00rmy/00资料/2.png" //图片地址
],
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "absolute", //图片位置
"width": "100%",
"height": "100%",
"z-index": "99999",
"background.repeat": "no-repeat",
"background-size": "100%,100%", //图片大小
"opacity": 0.2 //透明度
},
"background.useFront": true,
"background.useDefault": false, //是否使用默认图片
}
使用图片:
-
当然你也可以选择多个图片,并设置为不同样式,这样当你开两个并列窗口时,每个窗口都会显示。
"background.customImages": [
"file:///F:/Picture/Yukino/vs_background.png", "file:///F:/Picture/Yukino/vs_background123.png"
],
"background.styles": [
{
"content":"''",
"pointer-events":"none",
"position":"absolute",
"width":"100%",
"height":"100%",
"z-index":"99999",
"background.repeat":"no-repeat",
"background-size":"20%,20%",
"opacity":0.1
},
{
"content":"''",
"pointer-events":"none",
"position":"absolute",
"width":"100%",
"height":"100%",
"z-index":"99999",
"background.repeat":"no-repeat",
"background-size":"30%,30%",
"opacity":0.1
}
],
"background.useFront": true,
"background.useDefault": false,
注意:
- 1.安装该插件会令VS Code发出警告,选择不再显示即可
- 2.必须以管理员身份运行才能修改
- 3.最好使用透明背景的图片
- 4.每次vscode更新都会不显示图片,只要以管理员身份重启即可
参考文件:https://blog.csdn.net/yukinoai/article/details/84564949
2、快捷键
- 查询文件:ctrl + P
- 快速回到顶部 : ctrl + home
- 快速回到底部 : ctrl + end
- 文件---首选项---用户代码片段----搜 javaScript ,进入JavaScript.json
{
// log:console.log
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
],
"description": "Log output to console"
},
"deepCopy": {
"prefix": "jpjs",
"body": [
"JSON.parse(JSON.stringify($1));",
],
"description": "deepCopy"
},
}
参考文件:https://www.cnblogs.com/hellofangfang/p/10511193.html