修复 Sublime Text 2 括号匹配> 28 if()-测试?

Fix Sublime Text 2 brackets matching with > 28 if()-tests?

当内部有超过 28 个 if() 语句或 28 个 {} 对时,我的 Sublime Text 2 编辑器不会自动匹配(大括号)。

当将数字减少到 <28 时,它会神奇地再次匹配括号,如下所示。我怀疑一旦超过元素数量,ST2 默认不再匹配。不管您认为我的代码多么愚蠢,如果没有自动括号匹配,工作起来就会很烦人。

如何匹配括号而不考虑 if() / {} 对?

哪个文本编辑器可以默认执行此操作?

对于那些想在 Sublime Text 2 中尝试限制的人,这里是我摆弄的代码:

function increment() {

    if (timeStamp > 21112) {
        $('#us').html("USA " + counterUSio + "/" + counterUSiorup + " " + "MW");
        counterUSio = 0;
        counterUSiorup = 0;
    }
    if (timeStamp > 33587) {
        $('#cn').html("CHN " + counterCNio + "/" + counterCNiorup + " " + "MW");
        counterCNio = 0;
        counterCNiorup = 0;
    }
    if (timeStamp > 19902) {
        $('#sr').html("RUS " + counterSRio + "/" + counterSRiorup + " " + "MW");
        counterSRio = 0;
        counterSRiorup = 0;
    }
    if (timeStamp > 42676) {
        $('#ae').html("AE " + counterAEio + "/" + counterAEiorup + " " + "MW");
        counterAEio = 0;
        counterAEiorup = 0;
    }
    if (timeStamp > 22449) {
        $('#de').html("DE " + counterDEio + "/" + counterDEiorup + " " + "MW");
        counterDEio = 0;
        counterDEiorup = 0;
    }
    if (timeStamp > 27107) {
        $('#ar').html("AR " + counterARio + "/" + counterARiorup + " " + "MW");
        counterARio = 0;
        counterARiorup = 0;
    }
    if (timeStamp > 28116) {
        $('#am').html("AM " + counterAMio + "/" + counterAMiorup + " " + "MW");
        counterAMio = 0;
        counterAMiorup = 0;
    }
    if (timeStamp > 22929) {
        $('#be').html("BE " + counterBEio + "/" + counterBEiorup + " " + "MW");
        counterBEio = 0;
        counterBEiorup = 0;
    }
    if (timeStamp > 27234) {
        $('#bg').html("BG " + counterBGio + "/" + counterBGiorup + " " + "MW");
        counterBGio = 0;
        counterBGiorup = 0;
    }
    if (timeStamp > 30042) {
        $('#br').html("BR " + counterBRio + "/" + counterBRiorup + " " + "MW");
        counterBRio = 0;
        counterBRiorup = 0;
    }
    if (timeStamp > 22801) {
        $('#ca').html("CA " + counterCAio + "/" + counterCAiorup + " " + "MW");
        counterCAio = 0;
        counterCAiorup = 0;
    }
    if (timeStamp > 24866) {
        $('#ch').html("CH " + counterCHio + "/" + counterCHiorup + " " + "MW");
        counterCHio = 0;
        counterCHiorup = 0;
    }
    if (timeStamp > 31102) {
        $('#cz').html("CZ " + counterCZio + "/" + counterCZiorup + " " + "MW");
        counterCZio = 0;
        counterCZiorup = 0;
    }
    if (timeStamp > 28164) {
        $('#fi').html("FI " + counterFIio + "/" + counterFIiorup + " " + "MW");
        counterFIio = 0;
        counterFIiorup = 0;
    }
    if (timeStamp > 21662) {
        $('#fr').html("FR " + counterFRio + "/" + counterFRiorup + " " + "MW");
        counterFRio = 0;
        counterFRiorup = 0;
    }
    if (timeStamp > 30313) {
        $('#hu').html("HU " + counterHUio + "/" + counterHUiorup + " " + "MW");
        counterHUio = 0;
        counterHUiorup = 0;
    }
    if (timeStamp > 25294) {
        $('#in').html("IN " + counterINio + "/" + counterINiorup + " " + "MW");
        counterINio = 0;
        counterINiorup = 0;
    }
    if (timeStamp > 40789) {
        $('#ir').html("IR " + counterIRio + "/" + counterIRiorup + " " + "MW");
        counterIRio = 0;
        counterIRiorup = 0;
    }
    if (timeStamp > 23143) {
        $('#it').html("IT " + counterITio + "/" + counterITiorup + " " + "MW");
        counterITio = 0;
        counterITiorup = 0;
    }
    if (timeStamp > 23310) {
        $('#jp').html("JP " + counterJPio + "/" + counterJPiorup + " " + "MW");
        counterJPio = 0;
        counterJPiorup = 0;
    }
    if (timeStamp > 26861) {
        $('#kz').html("KZ " + counterKZio + "/" + counterKZiorup + " " + "MW");
        counterKZio = 0;
        counterKZiorup = 0;
    }
    if (timeStamp > 28302) {
        $('#kr').html("KR " + counterKRio + "/" + counterKRiorup + " " + "MW");
        counterKRio = 0;
        counterKRiorup = 0;
    }
    if (timeStamp > 30681) {
        $('#lt').html("LT " + counterLTio + "/" + counterLTiorup + " " + "MW");
        counterLTio = 0;
        counterLTiorup = 0;
    }
    if (timeStamp > 32611) {
        $('#mx').html("MX " + counterMXio + "/" + counterMXiorup + " " + "MW");
        counterMXio = 0;
        counterMXiorup = 0;
    }
    if (timeStamp > 25129) {
        $('#nl').html("NL " + counterNLio + "/" + counterNLiorup + " " + "MW");
        counterNLio = 0;
        counterNLiorup = 0;
    }
    if (timeStamp > 26224) {
        $('#pk').html("PK " + counterPKio + "/" + counterPKiorup + " " + "MW");
        counterPKio = 0;
        counterPKiorup = 0;
    }
    if (timeStamp > 35257) {
        $('#ro').html("RO " + counterROio + "/" + counterROiorup + " " + "MW");
        counterROio = 0;
        counterROiorup = 0;
    }
    if (timeStamp > 35257) {
        $('#ro').html("RO " + counterROio + "/" + counterROiorup + " " + "MW");
        counterROio = 0;
        counterROiorup = 0;
    }
    if (timeStamp > 35257) {
        $('#ro').html("RO " + counterROio + "/" + counterROiorup + " " + "MW");
        counterROio = 0;
        counterROiorup = 0;
    }
    if (timeStamp > 35257) {
        $('#ro').html("RO " + counterROio + "/" + counterROiorup + " " + "MW");
        counterROio = 0;
        counterROiorup = 0;
    }
}

此致, 奈巴夫

使用:

BracketHighlighter


它有一个 search_threshold 设置,允许您定义匹配括号对的最大字符数。