手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Emacs 使用Jslint

[日期:2012-11-29] 来源:Linux社区  作者:sheismylife [字体:大 中 小]

由于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. )
linux
相关资讯       emacs  Emacs使用  Jslint 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款