Sublime Forum

ST looking for file in old "xUser" folder on startup

#1

I’m a nonprogrammer–using ST for prose writing. I’ve been chasing down a problem all morning, and I’m baffled. I have a fair number of customized setting files in my Packages/User directory, including one called comment.sublime-syntax. I wanted to do some tweaking to some of those setting files, and before I started tweaking, I saved my whole User directory as xUser, and it’s sitting parallel to my new User directory (which contains all the same old files, which I am tweaking), i.e., both are directly under the Packages directory. I tweaked the comment.sublime-syntax file in my new User directory, but now every time I restart to check my changes, ST still wants to use the copy that’s under the xUser directory. If I take that xdirectory away, I get an error saying, in effect, that ST can’t find “xUser/comment.sublime-syntax.” But the file IS in the new User directory–shouldn’t ST be looking for it there? Why is it looking in xUser?

I hope that explanation makes some sense. Thanks for any thoughts.

0 Likes

#2

The syntax that’s assigned to a view stays there until something manually changes it (i.e. you doing it yourself, or a plugin). Additionally, once a syntax is set, that information is persisted (even across restarts of Sublime or closes and opens of a Sublime Project Window) for as long as that file remains open.

In this case, since it’s decided that the one to use is from the other package, it will keep trying to use that one unless told differently.

You can get it to find the correct one (after moving the xUser package away or adding it to the ignored_packages setting) by closing and re-opening the file in question, which will make Sublime look for the syntax again.

1 Like

#3

Thanks a lot for the fix, OdatNurd. That did the trick, of course. I was tearing my hair out, and I don’t have hair to spare. I appreciate the help.

0 Likes