我最近從 Atom 遷移到 VSCode,雖然我設法根據自己的喜好自訂大部分編輯器,但我仍然缺少一些我喜歡的 Atom 功能。
其中之一是 Atom 中的「id」屬性曾經是一種特定的顏色,類似於 #99FFFF。我瀏覽了主題,但無法找到一個使 id 屬性顏色與其他主題不同的主題。
我喜歡的另一個功能是,當創建一個新的 HTML 元素時,例如。一個div,它預設帶有最常用的基本屬性。我掌握了使用 emmet 片段的竅門,但它仍然無法正常工作,可能是因為我還不知道如何正確使用它。如果有這方面的備忘單,或至少有一些例子,我們將不勝感激。假設我想建立一個具有類型、名稱、id 和占位符屬性的輸入元素,我將如何使用 emmet 片段來做到這一點?
這是我的settings.json
##"editor.fontFamily": "'JetBrains Mono', Consolas, monospace",
"editor.fontLigatures": true,
"editor.letterSpacing": 0.4,
"editor.smoothScrolling": true,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorCustomizations": {
"editor.background": "#232323",
"sideBar.background": "#272727",
"sideBar.foreground": "#C9C9C9",
"editor.foreground": "#C9C9C9",
"statusBar.background": "#272727",
"activityBar.background": "#232323",
"titleBar.activeBackground": "#232323",
},
"window.zoomLevel": 1,
"emmet.triggerExpansionOnTab": true,
"emmet.showSuggestionsAsSnippets": true,
"editor.snippetSuggestions": "top"
Your Answer
1 個答案
您可以使用 settings.com 中的 tokenColorCustomizations 物件來變更 id 一詞的顏色或其屬性值:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"meta.attribute.id.html entity.other.attribute-name" // the word id
],
"settings": {
"foreground": "#ff0000",
// "fontStyle": "bold"
}
},
{
"scope": [
"meta.attribute.id.html string.quoted.double.html" // the id's vaue
],
"settings": {
"foreground": "#ff0000",
// "fontStyle": "bold"
}
}
]
}
請參閱編輯器語法反白顯示。
Hot Questions
function_exists()無法判定自訂函數
2024-04-29 11:01:01
google 瀏覽器 手機版顯示的怎麼實現
2024-04-23 00:22:19
子窗口操作父窗口,輸出沒反應
2024-04-19 15:37:47
父視窗沒有輸出
2024-04-18 23:52:34
關於CSS心智圖的課件在哪?
2024-04-16 10:10:18
Hot Tools
vc9-vc14(32+64位元)運行庫合集(連結在下方)
phpStudy安裝所需運行函式庫集合下載
VC9 32位
VC9 32位元 phpstudy整合安裝環境運行庫
php程式設計師工具箱完整版
程式設計師工具箱 v1.0 php整合環境
VC11 32位
VC11 32位元 phpstudy整合安裝環境運行庫
SublimeText3漢化版
中文版,非常好用
熱門話題
抖音等級價目表1-75
20338
7
20338
7
wifi顯示無ip分配
13531
4
13531
4
虛擬手機號碼接收驗證碼
11853
4
11853
4
gmail信箱登陸入口在哪裡
8836
17
8836
17
windows安全中心怎麼關閉
8421
7
8421
7
熱門文章
2025年加密貨幣市場十大趨勢預測:下一個風口在哪裡?
2025-11-07
By DDD
幣圈土狗項目如何識別?避免歸零幣的陷阱與風險預警
2025-11-07
By DDD
解決CSS @media 查詢優先級與規則覆蓋問題的教程
2025-11-07
By DDD
鐵路12306支付失敗訂單還在嗎_鐵路12306支付失敗訂單處理方法
2025-11-07
By DDD
win10字體安裝後在軟件裡找不到怎麼辦_win10字體安裝與識別方法
2025-11-07
By DDD





