歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux編程 >> Linux編程

Emacs 使用Jslint

由於jslint對tab的要求是8個空格寬度,默認的Emacs 的js模式格式化的代碼不符合要求。

Mx- customize-variable

然後對js-indent-level設置成8

通過Save for future sessions保存到.emacs文件中。

  1. (custom-set-variables
  2. ;; custom-set-variables was added by Custom.
  3. ;; If you edit it by hand, you could mess it up, so be careful.
  4. ;; Your init file should contain only one such instance.
  5. ;; If there is more than one, they won't work right.
  6. '(jde-run-option-debug (quote ("Server" "Socket" "javadebug" nil "5005" t)))
  7. '(js-indent-level 8))
  8. (custom-set-faces
  9. ;; custom-set-faces was added by Custom.
  10. ;; If you edit it by hand, you could mess it up, so be careful.
  11. ;; Your init file should contain only one such instance.
  12. ;; If there is more than one, they won't work right.
  13. )
Copyright © Linux教程網 All Rights Reserved