Visual Studio 2012 / 2013 Syntax Highlighting errors - c++

I have a problem with syntax highlighting in visual studio 2012 and 2013 preview with C++. I've had this problem since I installed both a few days ago (tried 2013 after I saw the problem in 2012).
As you can see from below, the colours are completely messed up in the text; some keywords such as int aren't properly highlighted, the grey return value is completely broken on various texts, the class colours have merged with various texts etc.
I've done the usual stuff found from google but had zero success, such as:
Reset intellisence from %appdata%
Reset user settings via command prompt or from Tools -> Import & Export settings
Turned off hardware acceleration in Visual Studio options.
This does not happen at all in Visual Studio 2010 fortunately, so I've kept that on my machine in the mean time. I did install 2012 and 2013 while 2010 was still present on my machine, but during install, i did not select the options to import 2010 settings, so "technically" they should have been clean IDE installs. The only other thing I've noticed is; when you start a project in 2012 or 2013, all the code highlighting is completely correct, but as soon as you change or add any text, everything messes up (like in the above image). So it does seem that Intellisense or whatever controls the highlighting only functions once on start up, and suddenly stops working for the duration of the program.

Delete this key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
and restart vs2013.
Found it in a discussion on codeplex. Although my problem was the lack of colors, you should try it

I can't offer a solution to this issue, but I can tell you that it's an issue that's plagued Microsoft Visual Studio 2012. In VS2010, the highlighting was fairly basic for C++, as you couldn't set the colouring on user types and loads of other things.
In VS2010, like you I had no problem with the syntax highlighting at all, but there was a lot less that you could actually highlight. Ever since they introduced this extra highlighting for C++ so you could colour a lot more items, it's been very buggy.
At the moment, I've got operators in all sorts of colours, matching brackets and braces in different colours and half-coloured qualifiers etc. I've just had to live with it... but if you're reading this MS, please... PLEASE... pretty please get it fixed.

Related

How do i change the colours of visual studio? [New user]

Im currently a C++ student in uni. I started using visual studio code configurated by a friend and then i changed to visual studio 2022 (the community version).
In visual studio code the code looks prrety much like this:
Then in visual studio it looks like this:
Does anyone know how to change the highlighted or at least can give me a hint? thanks!
I tried looking in the settings on visual studio but i got confused since there are many options and i dont know exactly what to change
You are probably looking for the Visual Studio Theme Pack extension, which brings the default VS code themes to VS. Also see this blog post for other converted popular VS code themes, and this blog post which describes a tool to convert any VS code theme.
Regarding the colored (rainbow) braces, there is the "Rainbow Braces" extension (corresponding blog post).
For further configuration, you might also want to have a look at the Visfora extension, which also includes rainbow braces.
Extensions aside, many of the colors can also be manually and individually configured in the Visual Studio's options → Environment → Fonts and Colors.

Resharper 'Ctrl Click' isn't working with visual studio 2017

Because of a Computer Change I recently had to install a fresh Visual Studio 2017 and the Resharper Ultimate Edition. After that, Ctrl-Click suddenly does no longer work as expected. Although the editor switches to "some" target, this target appears to be a bit "random".
Sometimes, though, it helps to simply step back with Ctrl-Minus to get to the desired target.
Any ideas?
I found the solution here. This also solved my Problem with a normal Ctrl-Click :)

Visual Studio 2013 Intellisense squigglies not working for 1 solution

It's remarkable how much one comes to rely on the red squigglies once they're gone.
I have 1 c++ solution in Visual Studio 2013 where the red squigglies will not show up. The rest of Intellisense works, except for the error checking. I have tried:
Resetting all settings in Visual Studio
Uninstalling and reinstalling Visual Studio
Deleting the dev folder and getting latest from TFS
Deleting all *.sdf files in the dev folder.
This problem only appears in 1 solution, though. I can create a new VC++ solution, and those magical red squigglies show up where they should.
Also, I'm not sure if this is related or not, but I globally lost variable highlighting in the enhanced scroll bar. In Visual Studio 2013, if you focus the cursor over a variable, you will see little highlights appear in the scroll bar, indicating where the variable is used. That feature no longer works across the board. Edits (yellow), Breakpoints (red), and saves(green) work, but not variable highlighting.

No Auto Complete Visual Studio 2010

Im using MS visual studio 2010 PRoofessional version , and in both languages I'm using (C++ and UnrealScript with Nfringe ) there seems to be no auto complete , also with the nfringe there is no auto indentation either .
I was wondering how to fix this?
Most probably you accidentally switched into low-impact IntelliSense mode by pressing
CTRL+ALT+SPACE Just hit CTRL+ALT+SPACE to go back to the IntelliSense mode.
Are you writing a totally unmanaged C++ dll? There is no intellisense support for CLI/C++ projects in VS 2010
I have actually problems with C++ and Intellisense since VC6...
We now use Whole Tomatoes "Visual Assist" and it repairs Intellisense. :-) This single feature is the money worth.
When you open the solution file, do you get a warning about being unable to open the IntelliSense database? If so, that's the reason—UnrealEngine intentionally has a directory with the same name as the IntelliSense database to prevent its creation (Visual Studio can't create a file if a directory of the same name already exists). The engine code base is so large that having IntelliSense enabled slows everything to a crawl when you're editing code.
I'm also using Unreal Engine, and I met the same problem before, the solution was set the dirs by myself in VS project setting.
Open the property window of ur game project(e.g UDKGame), navigate to "NMake", "Include Search Path", and fill the needed header search path there.
You may copy the path list from the output of UnrealBuildTool.
The values u set here is only used by Visual Studio's IntelliSense, so there's no need to worry about build error.
This only works for C++, I'm not sure what's wrong with Unreal Script. I just updated to Visual Studio 2010 and has not installed the new nFringe.
Hope this answer is not too late

BEGIN_MSG_MAP_EX breaks Visual Studio 2005 intellisense?

I have a C++ application using WTL/ATL BEGIN_MSG_MAP_EX macros for message handling. I use some macros from atlcrack.h.
When we upgraded the projects to Visual Studio 2005, intellisense acts crazy. I've tracked the behavior down to the BEGIN_MSG_MAP_EX macro not behaving correctly with intellisense. However, I can not find a way to continue using BEGIN_MSG_MAP_EX and Visual Studio 2005.
Do I have to rewrite all my old message handlers and stop using BEGIN_MSG_MAP_EX or is there another fix?
I've been using WTL for years and haven't come across this issue, but I also find the default Intellisense in VS2005/2008 next to useless - it stops working for no apparent reason. If you want Intellisense to work the way God intended, I recommend you try Visual Assist X (free 30 day trial) - it might make your problem disappear - got to be better than changing your code to work around IDE problems?
http://www.wholetomato.com/