From what I can tell from the CSON README and other CSON usages I've found on the Internet, it's conventional to use single rather than double quotes for string literals. Because of this (and because I agree with the rationale I've generally seen behind this convention), I am using it for my Atom config files, such as keymap.cson
:
'body':
'ctrl-tab': 'pane:show-next-item'
'ctrl-tab ^ctrl': 'unset!'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-shift-tab ^ctrl': 'unset!'
So far, this has worked fine for me. However, I am running into a problem when I try to use the same convention for my config.cson
file as well. For instance, I am trying to have its contents set to the following:
'*':
core:
disabledPackages: [
'exception-reporting'
]
restorePreviousWindowsOnStart: false
telemetryConsent: 'no'
welcome:
showOnStartup: false
whitespace:
ignoreWhitespaceOnCurrentLine: false
But if I open Atom and hit Ctrl+= Ctrl+- (to play with the font size) or do some other similar change and then restore Atom back to its previous state, Atom changes my config.cson
file to look like this:
"*":
core:
disabledPackages: [
"exception-reporting"
]
restorePreviousWindowsOnStart: false
telemetryConsent: "no"
editor: {}
welcome:
showOnStartup: false
whitespace:
ignoreWhitespaceOnCurrentLine: false
As you can see, it changed all the single quotes to double quotes and added an unnecessary editor
section.
Is there a way to prevent Atom from making these sorts of superficial changes to my config.cson
file? The reason this matters to me is that I am keeping my Atom config files in version control, so in order to prevent very noisy diffs, I would need to either disable this behavior or use inconsistent or suboptimal styling for my quotes, and I would find the former option much more preferable if it is possible.