Sublime-BracketGuard icon indicating copy to clipboard operation
Sublime-BracketGuard copied to clipboard

Feature request: Limit the scope of checking

Open gkvallis opened this issue 7 years ago • 2 comments

For very large files there is a little bit of slowdown in the action of checking brackets. Would it not be possible to set a user-configurable limit to the scope over which BracketGuard checks for matches? For example, it could be plus-or-minus 100 lines from a particular bracket, or it could stop checking if it encounters a blank line. This would catch most cases of mis-matched brackets, and the scope could be set to the size of the file itself if needs be. It seems like this would speed up the action without much loss of functionality in most cases. Something similar is used in TeXstudio. Thanks.

gkvallis avatar Oct 29 '17 11:10 gkvallis

Yes, trading accuracy for speed seems like a good idea. The current implementation is very "simplistic". I'll try to get back on that. If you have some free time, a PR would also be very appreciated :) Do you have any pointers to TeXstudios implementation of said feature?

philippotto avatar Oct 31 '17 08:10 philippotto

I can't really help with Texstudio and I'm not sure it does exactly what I said. But it does seem to confine checking to within a given LaTeX environment, like within \begin{enumerate} and \end{enumerate}. You'd need to be a bit more general than that, to cope with other languages.

I do like your plug-in -- it's very useful, and any improvements would be much appreciated.

gkvallis avatar Oct 31 '17 13:10 gkvallis