Sublime Text 3的格式化 js 代码
1.在SublimeText-Nodejs官网上下载Download ZIP压缩包
2.将SublimeText-Nodejs-master.zip解压到选定文件夹下,并且重命名为——Nodejs
3.点击sublime软件的Preferences->Browse Packages,将Nodejs文件放入其中
4.在Sublime上安装:Ctrl+Shift+P 调出Package Control 回车 => 搜索nodejs => 安装
5.更改设置:菜单->Preferences->Package settings->nodejs->settings-User打开更改"node_command","npm_command" 的下载的nodejs安装路径如"node_command": "F:/Program Files/Nodejs","npm_command":"F:/Program Files/Nodejs"
6.在Sublime上安装:Ctrl+Shift+P 调出Package Control => 搜索HTML/CSS/JS Prettify => 安装
7..更改设置:菜单->Preferences->Package settings->HTML/CSS/JS Prettify->set `node` path打开设置下载的nodejs安装路径如"windows": "F:/Program Files/Nodejs/node.exe"
8.菜单->edit->line->reindent格式化代码或者按快捷键ctrl+shift+h