目錄:
1住涉、背景圖片
2杖虾、快捷鍵
正文:
1条辟、背景圖片
-
1.以管理員身份運行VS Code弹渔,安裝background插件
image.png -
2.打開設置胳施,在搜索框中輸入background,選擇擴展中的plugin background肢专,選擇在setting.json中編輯
image.png -
3.在用戶設置中輸入以下代碼舞肆,修改完后按Ctrl+S保存,會提示重啟VS Code博杖,點擊確定后即可完成修改
image.png
// 整個文件
{
// #每次保存的時候自動格式化
"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, //是否使用默認圖片
}
使用圖片:
bg.png
-
當然你也可以選擇多個圖片椿胯,并設置為不同樣式,這樣當你開兩個并列窗口時剃根,每個窗口都會顯示哩盲。
image.png
"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發(fā)出警告,選擇不再顯示即可
- 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"
},
}