wistful / SublimeAutoPEP8

Automatically formats Python code to conform to the PEP 8 style guide using autopep8 and pep8 modules
144 stars 23 forks source link

Please add "Disable auto pep8 on this file" command #33

Open gsemet opened 9 years ago

gsemet commented 9 years ago

So this great feature can be temporally disabled when editing some files we don't want to change

Thanks

wistful commented 9 years ago

Could you please explain a case? Probably disabling formatting on save could be a solution.

gsemet commented 9 years ago

I just did it on a plugin for organizing the import statement: Python fix import (deliberately inspired on your plugin)

I have the pep8 formating always on save. But sometime I edit a file I don't want to touch (another project,...). For example: "disable auto pep8" for this file. Or "disable autopep8 for this session". I can submit a pl if you want.

wistful commented 6 years ago

Seems like autopep8 '--exclude' option could be useful here.

walling commented 3 years ago

This feature would be very helpful. In the JsPrettier plugin you can set it up to only format if it finds a .prettierrc file in some parent folder. The option is called auto_format_on_save_requires_prettier_config. This makes it possible to enable it on a per-project basis, even when you have format on save option turned on.

wistful commented 3 years ago

Thank you for the suggestion. Sounds like an interesting feature. The package is not actively maintained right now, and I can't promise I'll look into that. However, I'm open to PRs with new features and bug fixes. Contributions and help are very welcome.