|
作者:weekeight,來自原文地址
相關(guān)跳坑指南:跳坑《一百五十一》使用第三方編輯器(IDE)開發(fā)
在使用 atom 作為微信小程序開發(fā) IDE 時,由于微信小程序的模板文件拓展名為 .wxml 和樣式文件名為 .wxss,使得 atom 無法識別語法做代碼高亮,更不能使用 emmet 插件進(jìn)行補全。
支持語法高亮
-
// 在 config.cson 里 `core` 配置下添加 `customFileTypes` 配置即可支持 .wxml 和 .wxss 的語法高亮
-
core:
-
customFileTypes:
-
'text.html.mustache': [
-
'wxml'
-
]
-
'source.css': [
-
'wxss'
-
]
emmet tab 快捷鍵支持 .wxml 補全
-
// emmet 要先識別當(dāng)前文件的語法格式才能做自動拓展,故必須先完成上面步驟讓 atom 能識別 wxml 語法才行
-
// 在 keymap.cson 中添加如下配置即可
-
'atom-text-editor[data-grammar="text html mustache"]:not([mini])':
-
'tab': 'emmet:expand-abbreviation-with-tab'
參考鏈接:
http://flight-manual.atom.io/using-atom/sections/basic-customization/#customizing-language-recognition
|