Purpose of `*` in config.cson


#1

The root key is *, why not just go straight to the keys?


#2

There are also language specific settings at that level.


#3

Can you clarify? I don’t quite understand. Thanks!


#4

* means the settings there are global, regardless of the file type.

You can also have keys like .latex.tex.text, which contain config settings specific to LaTeX files. For example, that’s where I enable softwrap. The result is

  • no wrapping by default,
  • unless it’s a LaTeX file, in which case soft wrap.
"*":
  editor:
    softWrap: false
".latex.tex.text":
  editor:
    softWrap: true

(This is just an example; I can’t actually see the softWrap key under *.editor)

* Also note that these settings are written automatically when you change the language settings, so you don’t need to work this stuff out manually.


#5

Oh wow that totally makes sense now! Thank you!