SublimeOnSaveBuild icon indicating copy to clipboard operation
SublimeOnSaveBuild copied to clipboard

build system doesn't run on save if user settings are set to 0

Open danixland opened this issue 9 years ago • 4 comments

I've globally set the build_on_save to 0 in my user settings file, but I've added

"build_on_save": 1

in one of my projects, but still, whenever I hit the save shortcut, the file is saved but the build system doesn't trigger.

any clue on this?

danixland avatar Feb 15 '16 13:02 danixland

Is the file being saved having an extension that matches the regexp configured?

alexnj avatar Feb 15 '16 19:02 alexnj

thanks for your reply, yes, the file is .scss

danixland avatar Feb 15 '16 23:02 danixland

I'm having the same issue. Did you ever figure this out? My user settings are: { "filename_filter": "\\.(sass|scss)$", "build_on_save": 0 } And my project specific settings are: { "folders": [ { "path": "cg" } ], "build_on_save": 1 }

But it doesn't work.

robgnyc avatar May 12 '16 21:05 robgnyc

This seems to be ancient, but the correct way to do this is to put the relevant options in the "settings" dictionary of the .sublime-project file. e.g.

{
	"folders":
	[
		{
			"file_exclude_patterns":
			[
				".gitignore",
				".gitmodules"
			],
			"folder_exclude_patterns":
			[
				".git"
			],
			"path": "."
		}
	],
	"settings":
	{
		"ClangFormat":
		{
			"based_on_style": "File",
			"format_on_save": true
		},
		"build_on_save": 1,
		"filename_filter": "\\.(hpp|cpp)$",
		"tab_size": 4
	}
}

rwols avatar Mar 21 '17 20:03 rwols