Visual Studio 2022 Hilight Matching Brackets - text-editor

just installed VS22 and I can't seam to figure out how to turn on hilighting matching braces. It was working in VS19 and seamed like it was default but it's not working here.
What setting do I change?
I've tried changing Tools>Options>Environment (Show settings for "Text Editor") >Fonts and Color>Brace Matching(Hilight and Rectangle)
Because I read that the default colors are very nuance and hard to notice, but still nothing.
Should I just try reinstalling?
As you can see, it hilights key words and other places in the code where those words match up, but not the brackets. Same result no matter which side of the bracket I click on

Related

How can I find out exactly which rule is applying syntax highlighting to a particular code element in VS2022 with Resharper?

I'm running Visual Studio 2022 with Resharper (EAP) and the "Cyberpunk" theme from the VS marketplace (https://marketplace.visualstudio.com/items?itemName=T0uchM3.CTVS19)
Something is applying a white background to the syntax highlighting, but only on strings in JavaScript code which contain jQuery/CSS selectors - see this example:
Regular strings (e.g. the "click" in event handler declarations) are fine. I've been through the VS color list looking for anything with a white background but haven't found out where this is coming from.
Any way to highlight a code snippet and see what rules/plugins are applying syntax highlighting to that specific code snippet?
The specific setting here is Resharper Injected Language Background in Visual Studio Options > Environment > Fonts and Colors:
(Thank you #buhakmeh for figuring this one out!)

Sublimetext 3 indention guides not showing for every indent level

I'm having an odd issue in sublime text 3. I have the indention guide lines turned on, but for some reason the guides are not showing for every indention level.
I have my indention level set to four spaces. I double checked the number of spaces for the tags (b/c sometimes if you're missing a space sublime doesn't recognize it as a proper indention) and the number of spaces is fine:
I've been reading through the docs and looking in the forums but I can't seem to find a solution for this problem.
Anyone have any ideas?
I had exactly de same thing and found that I didn't have the font I had configured in font_face (consolas, in my case) so I changed the font to one I actually had (inconsolata, in my case) and the indentation guides worked perfectly (opensuse 42.2).

Change color of tab characters in Sublime Text 3 theme

I am using the Fortran text highlighting package for ST3, and I am making a theme using this fantastic homepage.
But see the image below. Where there are tab characters within the code (not indentation), those are colored in pink. How can I change that color, or remove it?
In the preferences, default file settings you get this instruction for changing the width and color of indent guides.
// Set to false to turn off the indentation guides.
// The color and width of the indent guides may be customized by editing
// the corresponding .tmTheme file, and specifying the colors "guide",
// "activeGuide" and "stackGuide"
"draw_indent_guides": true,
With some trial and error I found that the property is indeed a variable on this page and it's called Invalid. That is also the name in the .tmTheme file. But on the site there are no such characters in the sample code (that I saw) and the name isn't obviously related to the tab characters in my code.
The pink was in fact the default Invalid color on the theme editor site.
You are supposed to remove those, since they are not supposed to be there. They are referenced as Invalid token which can show signs for deprecation, unreadable code etc. It is supposed to look like:
diff = first - second
and not
diff = first - second
If you really want to overwrite that, you can edit the syntax definition file or overwrite it in your User folder.
Go to Preferences -> Browse Packages -> Fortran -> grammars
Open FortranModern.sublime-syntax or FortranFixedForm.sublime-syntax
Remove the following lines
# tabs are illegal
- match: \t
scope: invalid.illegal.tab.fortran
Done?
PS: A pull request to fix this has already been merged so next builds should be fine

Unexpected font in CListCtrl?

I have a CListCtrl object and I use:
AddData(m_listControl, 0, 0, " Abc ");
This works fine in older version of Visual Studio (2008).
However in Visual Studio 2013 I am using UNICODE character set, and the above displays a strange font in the List Control Box.
Can someone please tell me how to insert (AddData or another way) so that the CListCtrl displays english character set?
Use TEXT( " Abc " ). TEXT() macro makes strings Unicode or ASCII depending on compiler settings.
Well, why did you use this title:
"Unexpected font in CListCtrl?"
your problem has nothing to do with a font.
It also has nothing to do with list view control. It is AddData function that is giving you a hard time.
I am sure that in parameter list, the fourth argument is defined as const char*. You will have to change function’s signature.
Try LPCTSTR as type.
Than, follow i486's answer.

Plugin for R# similar to CodeRush "statement highlight"

See here http://www.hanselman.com/blog/InSearchOfThePerfectMonospacedProgrammersFontInconsolata.aspx - for want of a better description - the statement block highlighting - eg in the pics on the link the "statement blocks" are grouped with a vertical line. I understand this is a feature of CodeRush - does R# have either anything similar, or a plugin to do the same?
I use the latest version of ReSharper that is currently available — ReSharper 4.5 — but unfortunately I don't believe there is any feature for drawing a vertical line between matching braces, as in the screen-shots you referenced.
The feature I find useful, which Ben mentioned, is the matching brace highlighting, however this only takes effect when your cursor is adjacent to an opening or closing brace.
R# has a feature called Highlight current line, which you have to enable in the ReSharper options. This looks like crap on dark background, high contrast themes, so if you use one I'd suggest going into the Visual Studio options, under Fonts & Colors and going to "ReSharper - current Line" and making the background color a darker shade that doesn't have as much contrast with the background.
R# also has matching brace highlighting, which is color-configurable as well under the same VS option dialog.
Does that answer you question?
Notepad ++ has a nice brace matching feature, with vertical lines matching the braces. It's not VS, so I only use it when I am faced with some confusing JS, cut and paste, figure out the braces and go back to VS. It would be GREAT if this sort of feature existed in VS, or R#.

Resources