Sublime Text:插件HTML-CSS-JS Prettify能夠格式化HMTL/CSS/JSphp
1.安裝Node.jshtml
2.Sublime中ctrl+shift+p,輸入ip:node
3.點擊Install Package,而後搜索HTML-CSS-JS Prettify,按肯定linux
4.安裝完以後不能正常使用,須要設置一下路徑,右擊頁面多了一個HTML/CSS/JS Prettiy的選項,設置一下Node路徑:git
五、設置以下,根據本身的操做系統改下Node的安裝路徑github
{
// Simply using `node` without specifying a path sometimes doesn't work :(
// https://github.com/victorporof/Sublime-HTMLPrettify#oh-noez-command-not-found
// http://nodejs.org/#download
"node_path": {
"windows": "D:/Program Files/nodejs/node.exe",
"linux": "/usr/bin/nodejs",
"osx": "/usr/local/bin/node"
},
// Automatically format when a file is saved.
"format_on_save": false,
// Only format the selection if there's one available.
"format_selection_only": true,
// Log the settings passed to the prettifier from `.jsbeautifyrc`.
"print_diagnostics": true
}
六、使用快捷鍵爲:Ctrl+Shift+Hwindows
相關文章:spa