Bracket matching
Bracket matching, also known as brace matching or parentheses matching, is a syntax highlighting feature of certain text editors and integrated development environments that highlights matching sets of brackets (square brackets, curly brackets, or parentheses) in languages such as Java, JavaScript, and C++ that use them.[src] The purpose is to help the programmer navigate through the code and also spot any improper matching, which would cause the program to not compile or malfunction.[src] If a closing bracket is left out, for instance, the compiler will not know that the end of a block of code has been reached.[src] Bracket matching is particularly useful when many nested if statements, program loops, etc.[src] are involved.[src]
Bracket matching, also known as brace matching or parentheses matching, is a syntax highlighting feature of certain text editors and integrated development environments that highlights matching sets of brackets (square brackets, curly brackets, or parentheses) in languages such as Java, JavaScript, and C++ that use them.[src] The purpose is to help the programmer navigate through the code and also spot any improper matching, which would cause the program to not compile or malfunction.[src] If a closing bracket is left out, for instance, the compiler will not know that the end of a block of code has been reached.[src] Bracket matching is particularly useful when many nested if statements, program loops, etc.[src] are involved.[src] ==Implementations== Vim's % command does bracket matching, and NetBeans has bracket matching built-in.[src] Bracket matching can also be a tool for code navigation.[src] In Visual Studio C++ 6.0, bracket matching behavior was set to ignore brackets found in comments.[src] In VSC 7.0, its behavior was changed to compute commented brackets.[src] IntelliJ IDEA's Ruby on Rails plugin also enables bracket matching.[src] It has been proposed that Perl 5 be modified to facilitate bracket matching.[src] The Microsoft Excel 2003 formula bar has parentheses matching.[src] Its implementation shows all the pairs of parentheses as different colors, so it is possible to easily analyze them all at once.[src] ==Example== In this example, the user has just typed the closing curly brace ' } ' defining a code block, and that brace and its corresponding opening brace are both highlighted.[src] for (int i = 0; i { System.out.println(i); } │ ==See also== ==References== pt:Realce de sintaxe#Parênteses correspondentes[src]
20 sentences · 20 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Bracket matching." encyclopegia.org, 2024, https://encyclopegia.org/wiki/bracket-matching. Accessed 27 November 2026.
Chicago
"Bracket matching." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/bracket-matching.
APA
encyclopegia.org. (2024). Bracket matching. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/bracket-matching
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON