html-css-js prettify插件无效:

html-css-js prettify插件无效:
刚开始运行格式化代码时,报node路径不对的错误,后改成正确的路径,却还是无效,。
我的node安装在:D:/nodejs/node.exe;
设置这个插件的node_path路径为这个地址,ctrl+shift+h无效,也不报错

{
  "node_path": {
    "windows": "D:/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.8k
3 个回答

文件路径有中文,就不行

快捷键设置对不对?

clipboard.png

这是我的快捷键,按ctrl+E ctrl+D 可以格式化的

[{
  "keys": [ "ctrl+e","ctrl+d"],
  "command": "htmlprettify"
}, {
  "keys": ["ctrl+alt+h", "p"],
  "command": "htmlprettify_set_prettify_prefs"
}, {
  "keys": ["shift+alt+h", "o"],
  "command": "htmlprettify_set_plugin_options"
}, {
  "keys": ["ctrl+alt+h", "k"],
  "command": "htmlprettify_set_keyboard_shortcuts"
}, {
  "keys": ["ctrl+alt+h", "n"],
  "command": "htmlprettify_set_node_path"
}]
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题