Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dot-symbol in config-key #255

Open
gabor opened this issue Feb 1, 2017 · 3 comments
Open

dot-symbol in config-key #255

gabor opened this issue Feb 1, 2017 · 3 comments

Comments

@gabor
Copy link

gabor commented Feb 1, 2017

i'm trying to convert the following code from config.cson to .proton:

".js.source":
  editor:
    tabLength: 2

i tried to simply do

[".js.source.editor.tabLength" 2]

but proton uses . to split the key it seems, so it becomes

  ""
    js:
      source:
        editor:
          tabLength: 2

any ideas what to do here? is there perhaps a way to escape the . ?

@sglyon
Copy link
Contributor

sglyon commented Feb 1, 2017

I have this in my ~/.proton

["editor.tabLength" 2 {:scopeSelector [".source.ruby" ".source.coffee" ".text.tex" ".source.cpp", ".text.html"]}]

which ends up like this in my ~/.atom/config.cson

".coffee.source":
  editor:
    tabLength: 2
".cpp.source":
  editor:
    tabLength: 2
".html.text":
  editor:
    tabLength: 2
".ruby.source":
  editor:
    tabLength: 2
".tex.text":
  editor:
    tabLength: 2

@sglyon
Copy link
Contributor

sglyon commented Feb 1, 2017

@gabor
Copy link
Author

gabor commented Feb 1, 2017

thank you, it works well.
i have to specify it twice, like this:
(i want it to default to 4, and be 2 for javascript)

    ["editor.tabLength" "4"]
    ["editor.tabLength" "2" {:scopeSelector [".js.source"]}]

i was not sure if it will work, but it worked fine. maybe the manual could also have an example where it is used multiple times?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants