课程表

Atom课程

工具箱
速查手册

Atom config.cson 基础

当前位置:免费教程 » 软件/图像 » Atom

Atom 把 core 的核心插件 autocomplete 替换成 autocomplete plus。

config.cson 配置

  1. "*":
  2. "exception-reporting":
  3. userId: "dce1a874-569c-0d60-1714-66461c6d20f9"
  4. core:
  5. themes: [
  6. "graphite-ui"
  7. "seti-monokai"
  8. ]
  9. disabledPackages: [
  10. ]
  11. editor:
  12. invisibles:
  13. {}
  14. softWrapAtPreferredLineLength: true
  15. softWrap: true
  16. fontFamily: "monoca"
  17. fontSize: 20
  18. showIndentGuide: true
  19. linter:
  20. statusBar: "Show all errors"
  21. minimap:
  22. scrollAnimation: true
  23. "tree-view":
  24. hideVcsIgnoredFiles: true
  25. "autocomplete-plus":
  26. {}
  27. "linter-csslint":
  28. {}
  29. "vim-mode":
  30. startInInsertMode: true
  31. "filetype-color":
  32. enabled: "true"
  33. welcome:
  34. showOnStartup: true;
  35. "isotope-ui":
  36. {}
  37. "file-icons":
  38. onChanges: true
  39. forceShow: true
  40. "atom-beautify":
  41. _analyticsUserId: "cde3641c-d5ee-4ccb-9d45-37f85f7e98e9"
  42. csslint:
  43. validateOnChange: true
  44. autosave:
  45. enabled: true

从上面的代码可以看出配置文件是作用于全局的。

最主要分为两大类,一类是 core,一类是 editor。

下面这个版本是加注释的(我用#开头的都是注释),大伙可以参考下。

  1. "*":
  2. #这个用户ID用于提交异常的,官方描述:Reports uncaught Atom exception to bugsnag.com
  3. "exception-reporting":
  4. userId: "dce1a874-569c-0d60-1714-66461c6d20f9"
  5. core:
  6. #主题设置,主题和语法主题同时配置需要用中括号包含;若是单一主题则不需要,只需要双引号即可.
  7. themes: [
  8. "graphite-ui"
  9. "seti-monokai"
  10. ]
  11. #这里跟Sublime Text的配置"ignored_packages": ["package_name"]一样的效果,禁用某某插件
  12. disabledPackages: [
  13. ]
  14. editor:
  15. invisibles:
  16. {}
  17. #表示是否按照上面设置过的「推荐行宽(默认 80 个字符)」来折行,否则默认按照屏幕宽度来折行
  18. softWrapAtPreferredLineLength: true
  19. #是否开启折行
  20. softWrap: true
  21. #字体及字体大小
  22. fontFamily: "monoca"
  23. fontSize: 20
  24. #显示缩进辅助线
  25. showIndentGuide: true
  26. #这一块基本都是所有插件的配置 ,具体都可以参考插件作者的介绍再做调整
  27. #显示所有错误
  28. linter:
  29. statusBar: "Show all errors"
  30. #这个还有多个参数,可以配置是否高亮显示颜色等,此处是启用滚动动画
  31. minimap:
  32. scrollAnimation: true
  33. #忽略显示一些文件
  34. "tree-view":
  35. hideVcsIgnoredFiles: true
  36. #待进一步自定义
  37. "autocomplete-plus":
  38. {}
  39. #待进一步自定义
  40. "linter-csslint":
  41. {}
  42. #vim-mode这个插件默认启用的方式是插入,而不是命令模式
  43. "vim-mode":
  44. startInInsertMode: true
  45. #这个是更改文件类型颜色(插件),这里启用了
  46. "filetype-color":
  47. enabled: "true"
  48. #启用atom的自动进入引导界面..蛮实用的
  49. welcome:
  50. showOnStartup: true;
  51. #UI主题的自定义,,空则不生效
  52. "isotope-ui":
  53. {}
  54. #插件生效,更多样化的文件图标
  55. "file-icons":
  56. onChanges: true
  57. forceShow: true
  58. #这个是排版插件带的,,这里的用户ID的作用不清楚
  59. "atom-beautify":
  60. _analyticsUserId: "cde3641c-d5ee-4ccb-9d45-37f85f7e98e9"
  61. #在文件更改时候生效(进行查询错误)
  62. csslint:
  63. validateOnChange: true
  64. #这个是内置的核心插件,自动保存功能,挺实用的
  65. autosave:
  66. enabled: true

总结

新版本还有有众多改进的,我仔细的查询了 core 插件,丰富了许多,也抛弃了许多过气的 API; 有很多功能让 Atom 更加人性化了…比如更改文件编码,查询项目内的文件进行编辑等等。

转载本站内容时,请务必注明来自W3xue,违者必究。
 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号