Sublime Forum

How can I save view without triggering post-save hooks?

#1

Greetings!

I have need of saving a file without triggering any post-save hooks. I’m working on a SublimeLinter plugin, and the linter I am calling only works on the current state of the files in the directory. It cannot accept file data over STDIN.

As such, I need to save the file right before the linter is called, but using view.run_command("save") triggers any post-save hooks. The save-and-lint is plenty quick, but it is possible that users will have a post-save hook that takes an unacceptable amount of time to run.

Is it possible to save without triggering any post-save behavior?

Thanks!

0 Likes