I would tend to agree that it shouldn’t draw attention to itself unless you care. Unless it’s made a bit smarter/more configurable, it might end up being something I disable (which is not to say it isn’t valuable for other users, of course.) That said, I’m taking a very C#-centric view here, so maybe it’s more helpful in other languages, but for me personally it’s not a feature that I am entirely sold on. So given that I’m not (personally) experiencing a confusion problem there, I find the seemingly inconsistent syntax colouring to be more of a distraction than anything else. Likewise, I never have trouble with square brackets for indexers because even when they’re nested in a bunch of other brackets, those outer brackets tend to be parentheses, not extra square brackets. This mostly happens with parentheses due to nested/inline method calls, casts, parenthetical math expressions, etc.įor brackets that are on their own line, indentation (especially with vertical guides) is more than enough for me to understand where blocks start and end. Vscode does this, but I only find it useful for when multiple sets of brackets of the same kind are present on the same line. The feature request ticket is a suitable place to share your comments and thoughts, so make sure to vote and comment there as well.ĭo you like the idea of community experiments like this one? Let us know in the comments below. Make sure to share any ideas and bugs on the GitHub issue tracker, and feel free to send pull requests too. If this feature is interesting to you, please install the Rainbow Braces extensions and take it for a ride. Or use the keyboard shortcut Ctrl+Shift+9 to execute the Toggle Rainbow Braces command. You can easily toggle the colorization on and off from the Edit -> Advanced top-level menu. The colors work equally well for both light and dark themes and can be customized in the Fonts and Colors options page. It has four unique colors that it will cycle through and repeat for as many levels deep as needed. We call it Rainbow Braces and the first iteration adds basic colorization to curly brackets, square brackets, and parentheses (see image above).įigure 1: Colorized bracket pairs in both light and dark theme We’re starting out with an extension to kick off the experiment. So, with increased interest and multiple viable solutions, what would the right implementation look like for Visual Studio users? Granted, they all colorize bracket pairs, but the way they do it differs and a lot of them provide additional features and options.Ī feature request on the Visual Studio Developer Community is also now gaining steam asking for colorized bracket pairs, so please vote and comment if you agree. What’s interesting about all these implementations is how they all do things a bit differently. For example, the Viasfora extension for Visual Studio has provided this feature for many years. Various IDE’s and editors offer this feature today – usually done through extensions. By color-coding bracket pairs, we’re making this much easier. For people with color blindness or other optic maladies, the problem can be even worse. When dealing with deeply nested brackets in Visual Studio, it can be hard to figure out which brackets match and which do not.
0 Comments
Leave a Reply. |