热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

SublimeText:格式化插件HTML-CSS-JSPrettify

SublimeText:插件HTML-CSS-JSPrettify可以格式化HMTLCSSJS1.安装Node.js2.Sublime中ctrl+shift+p,输入ip:3.点击Ins

Sublime Text:插件HTML-CSS-JS Prettify可以格式化HMTL/CSS/JS

1.安装Node.js

2.Sublime中ctrl+shift+p,输入ip:

3.点击Install Package,然后搜索HTML-CSS-JS Prettify,按确定

4.安装完之后不能正常使用,需要设置一下路径,右击页面多了一个HTML/CSS/JS Prettiy的选项,设置一下Node路径:

5、设置如下,根据自己的操作系统改下Node的安装路径

{
// 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
}

6、使用快捷键为:Ctrl+Shift+H

 

相关文章:

sublime package control 安装

 


推荐阅读
author-avatar
卍扯淡的爱卍_989
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有