Sublime Forum

Don't mess around with the configuration file

#1

I noticed that in ST3 the configuration file looses it’s comments, tabs, and order whenever is saved.

I used to have a heavily commented configuration file, and I also ordered the settings to my linking.

It would be nice if the configuration file could be preseved exactly as the user edited it, with tabs and order.

I’ve seen people having the same trouble

they adviced to save the propertis with a preceding ‘_’, but that doesn’t solve the problem os the tabs, comments and ordering.

would it be ok to open a bug report, or is this the expected behaviour?

saludos

sas

0 Likes

#2

It doesn’t fix the issue, but if you keep your User package where these files reside as a git (or similar) repository, then at least you can save and recover the history of the files.

0 Likes

#3

I have to say… this is rather painful. Sublime Text, to me, represents common-sense ease of use – with little power sacrificed – compared to the old guard (emacs, etc.). Messing with my hard-earned config files seems to go against this mantra!

Yeah… I’m gonna have to put them into source control.

0 Likes

#4

That caught me by surprise the first time as well; since I was just getting used to everything I had the file commented to remind me how things worked. However as someone that maintains an in-house configuration file loader, I totally understand why it doesn’t try to maintain comments when it rewrites files. I’m just glad that comments are allowed at all.

So far as I can tell the only thing that causes it to be rewritten is changing the font size on the fly, but I haven’t done any extensive testing by any stretch. In light of that it seems like a strange design decision to have that one setting persist when e.g. changing word wrap does not. It does make logical sense I guess, since font size is probably more of a global thing.

However even before I noticed that this happens I’d already put my user package into a git repo for easy sharing among all of my dev machines.

0 Likes