Atom编辑器折腾记_(6)config.cson基础教程

号外

昨天,atom官方更新了atom的版本;
把之前内置到core的核心插件autocomplete替换成autocomplete plus,还做了许多修正,具体看这里

Notable Changes

  • Atom now bundles Autocomplete Plus and the completion providers for HTML, CSS, Less, Sass, snippets, and the Atom API
  • Opening editors is now significantly faster than previously releases
  • Fixed an issue where packages with invalid Git repository URLs in their package.json file wouldn’t load
  • Running atom with no arguments from the command line now re-opens the previously-opened windows. Use atom . to open the current working directory
  • Fixed an issue that prevented Atom from re-opening its previously opened windows during startup on Linux and Windows
  • The Fuzzy Finder now highlights the portions of the file path that match the search text
  • The Command Palette now highlights the portions of the command name that match the search text
  • Fixed an issue on Linux and Windows 7 where the spell checker would fail to highlight misspelled words
  • Fixed an issue where fs and path would be accidentally available as global variables

激动之余我把之前安装的autocomplete plus插件卸载了.因为官方内置内到核心插件了…下载到新版本,直接解压完全覆盖之前的版本;

config.cson

下面是我个人的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更加人性化了…比如更改文件编码,查询项目内的文件进行编辑等等
非常期待正式版1.0;到时候再做介绍

还有一些迷人的特性和功能,待我再研究下,再分享给小伙伴们!!

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

crper

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值