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


#1

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
"exception-reporting":

this is based on this file which looks correct

https://gist.github.com/lcodyc4321/02c8d7e7311f307d7a59


#2

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.


#3

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

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


#4

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.


#5

@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-

autosave:
enabled: true

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


#6

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


#7

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?


#8

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


#9

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.


#10

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


#11

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