Movatterモバイル変換


[0]ホーム

URL:


codecamp

Atom config.cson 基础教程

config.cson 基础教程

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

config.cson 配置

"*":  "exception-reporting":    userId: "dce1a874-569c-0d60-1714-66461c6d20f9"  core:    themes: [      "graphite-ui"      "seti-monokai"    ]    disabledPackages: [    ]  editor:    invisibles:      {}    softWrapAtPreferredLineLength: true    softWrap: true    fontFamily: "monoca"    fontSize: 20    showIndentGuide: true  linter:    statusBar: "Show all errors"  minimap:    scrollAnimation: true  "tree-view":    hideVcsIgnoredFiles: true  "autocomplete-plus":    {}  "linter-csslint":    {}  "vim-mode":    startInInsertMode: true  "filetype-color":    enabled: "true"  welcome:    showOnStartup: true;  "isotope-ui":    {}  "file-icons":    onChanges: true    forceShow: true  "atom-beautify":    _analyticsUserId: "cde3641c-d5ee-4ccb-9d45-37f85f7e98e9"  csslint:    validateOnChange: true  autosave:    enabled: true

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

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

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

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

总结

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

Atom 保存与预览功能
Atom Emmet 实例教程
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录
Atom 简介
Atom 基础
Atom 插件主题推荐
Atom 自定义按键绑定
Atom 保存与预览功能
Atom config.cson 基础教程
Atom Emmet 实例教程
Atom 分屏操作
Atom 实用侧边栏插件
Atom CSScomb 增强版
Atom 编辑器实时预览 HTML 页面
Atom Sync-setttings(插件-备份神器)
Atom JS 代码智能提示补全
Atom JQ 代码片段补全
Atom JS 代码片段补全
Atom 深入自定义快捷键
Atom atom-minify(CSS/JS压缩神器)
Atom Atom 内运行 gulp 的实现方法
Atom Atom 代码输入震动效果

ATOM版本更新

关闭

MIP.setData({'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false},'pageFontSize' : getCookie('pageFontSize') || 20});MIP.watch('pageTheme', function(newValue){setCookie('pageTheme', JSON.stringify(newValue))});MIP.watch('pageFontSize', function(newValue){setCookie('pageFontSize', newValue)});function setCookie(name, value){var days = 1;var exp = new Date();exp.setTime(exp.getTime() + days*24*60*60*1000);document.cookie = name + '=' + value + ';expires=' + exp.toUTCString();}function getCookie(name){var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)');return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null;}
[8]ページ先頭

©2009-2025 Movatter.jp