Sublime Forum

SublimeLinter settings get deleted on upgrade

#1

Hi

I am using Sublimelinter mainly for python.

In the file

C:\Documents and Se…\Sublime Text 2\Sublime Text 2.0.1\Data\Packages\SublimeLinter\SublimeLinter.sublime-settings

I update the pep8_ignore section which hides problems I am not concerned about.

The trouble is every time SublimeLinter is updated (this happens automatically and quite often) a new settings file replaces my file removing my pep8_ignore list.

Is there a way of making the pep8_ignore list stay when the plugin is upgraded.

Thanks for your help.

Nick

0 Likes

#2

Default settings are always overridden. That’s why you should put all your changes in the user settings file.

0 Likes

#3

How do I do that?

0 Likes

#4

Preferences > Package Settings > SublimeLinter > Settings - User

0 Likes

#5

Thanks for the link to the file. I have restored the default settings to how it was and updated my user settings file but it does not seem to be working.

The ignore list is not being seen.

My user settings file looks like this…

{
	"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
	"dictionary": "Packages/Language - English/en_GB.dic",
	"font_size": 12.0,
	"font_face": "Courier New",

	"translate_tabs_to_spaces": true,


    "pep8_ignore":
    
        "E501","W293","E225","E231","E302","E261","W291","E221","E303"
    ]    
}
0 Likes

#6

Does anybody know how to get user settings to work properly or are they broken for my scenario?

0 Likes

#7

I think you need to put the SublimeLinter settings into a SublimeLinter.sublime-settings file in your User Packages directory (instead of in Preferences.sublime-settings). That User Package file should survive any updates to the main package.

When I added the following to a SublimeLinter.sublime-settings file, it worked.

[code]“pep8_ignore”:

    "E501","W293","E225","E231","E302","E261","W291","E221","E303"
]

[/code]

I did find that I need to force the linter into firing. Making an edit on the file (or restarting) caused the items to disappear as needed.

0 Likes

#8

Thanks fizzicist that has solved the problem.

0 Likes