Error in config.cson: won't accept editor settings


Hi, I followed the instructions in the autosave readme and added the setting under “editor:”

After trying tab > space and then space > tab, to no avail, it won’t load config.cson:

[stdin]:2:25: error: unexpected indentation

this is based on this file which looks correct


Is it possible your indentation is a mixture of tabs and space? Turn on invisibles and check.

Also when I put your code into my chrome extension coffeescript enhanced I’m getting

Parse error on line 2: Unexpected '}'

Also also you might try running coffee -c config.cson.


What’s that do? I looked for it but it doesn’t seem to be in the extensions store?

Found a direct link. Strange though that it doesn’t show up in the normal search.


That’s weird. I’m running it in chrome but you’re right, it’s not in the store. It’s actual name is “Try CoffeeScript Enhanced”. I would have assumed that if it was pulled from the store it would quit running here also.

It is a popup that converts CS to JS and JS to CS. You just paste and it shows both. There is also a run button.


@mark_hahn, I did have a spacing issue that wasn’t correcting to tabs (2 spaces instead of 4), and now my file saves. it is attached. but it still will not accept “autosave.enabled: true” anywhere, after “*”, after welcome, core, editor, unindented…it doesn’t take it anywhere.

Edit: the correct syntax was-

enabled: true

with autosave indented to the same level of ‘editor’ and enabled once after that.


Yea, with the direct link I had no problem installing it and it works fine.
Neat little helper.


This code sample should be shown as code with triple ticks. It is showing as two lines in your post.

So is your complete corrected code somewhere?


This is the exact format, it seems gist doesn’t support cson. It is actually working as all spaces, not tabs, which surprised me- but the config saves correctly, and autosave is now enabled


Before Atom I always used tabs. But Atom had a lot of trouble supporting tabs when I started, more than a year ago. I don’t know if there are still problems with tabs.


I think I’m just not understanding the docs, maybe specific examples in a packages readme would help? Most of us using this are complete coffee script nubs


autosave is a package name. And editor and core are the two non-package namespaces that, yes, are at the same level as packages.