如果内部有超过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;
}
}
此致 Naibaf