Clear the output window when a predefined text is found. #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Andrew. First of all, thank you for this great plugin!
I'm using RSpec with Guard, and every time a file is updated, the corresponding specs are executed. Right now, all the output is appended in the output window, but I would like to clear this window every time RSpec is executed.
I made a change that allows the user to define a text (regex) that, when found, clears the output window.
Some examples of the defined text:
How to use
The user must create a json file called "Guard.sublime-settings" in the user config directory ("Packages/User/"). This file has this format:
The text must be a regular expression. Its possible to use "|" (OR) to find more than one text.
Limitations
I'm loading the settings every time a guard command is executed. If the user change the settings, a guard command must be executed to reload it. It's possible to load the settings inside the append_data method, but I don't know if there is some performance issue with slow computers.