One thing that has always annoyed me in Visual C++ is the fact that, unlike Visual C#, intellisense does not automatically display when a new line (or equals sign, etc) is entered, so I must press Ctrl+Space every time.
Is there any way to change this? It has gotten to the point where I have even considered using something like AutoIt to detect when I press Enter and insert a Ctrl+Space accordingly. Obviously, that is far from ideal.
Has the Visual Studio crew really overlooked such a glaringly obvious mistake, or have I simply missed an option somewhere?
That is by design behavior on the part of C++ IntelliSense. There is no option to change it. Alternative behaviors are supported by 3rd party extensions like Visual Assist X, however express editions of Visual Studio do not support addins and tool extensions.
Related
I have been looking high and low for a way to auto collapse to definitions in visual studio 2012 when you open a file.
I found a solution for VS2010 here Any way to auto collapse to definitions whenever you close a document? but that requires a Macros which has been taken out in VS2012.
Any Solution would be much appreciated!
Yes, macros are definitely gone from Visual Studio 2012.
Not exactly what you requested, but the Ctrl-M, Ctrl-O keyboard shortcut is fast.
Third party tools like CodeRush! or Resharper may help here. I know that CodeRush is very customizable.
You can also create your own Visual Studio Extension. Extensions are more powerful than macros, but have a bit of a learning curve.
I have been evaluating Resharper and have heard how great it is. I agree that its code inspection is great, but I have to seriously disagree with the greatness of most other features.
All of the warts it adds to Visual Studio are killing my productivity. It has eaten Visual Studio's shortcut keys even though I told it not to, and even when I remap "Find All References" to Visual Studio, Resharper still coopts it.
We would like to be able to use the Code Inspection functionality and absolutely nothing else. Is this possible through documented or undocumented methods?
If problem only in keyboard shortcuts, you can change Keyboard scheme to Visual Studio. Go to menu Resharper -> Options -> Keyboard and Menus. Check Visual Studio Keyboard scheme at right part of window and apply it.
I have inherited a Visual C++ project with about four thousand lines of code in a single file. The code compiles great with /clr:oldSyntax but when I change anything in the designer, it updates it to the new syntax and then everything breaks.
How do I keep the designer from converting my code to the new syntax (gcnew et al)? If this isn't possible, what's the quickest way to convert the entire project at once to the new syntax?
Unfortunately, this is not possible. The Windows Forms designer stopped supporting the old managed C++ syntax back in version 2003. You'll have to either revert back to that version of Visual Studio for maintenance of this code base, or bite the bullet and convert the project to use the new C++/CLI syntax.
I don't know if you're going to find much in the way of an automated solution for converting from managed C++ to C++/CLI. You might start looking in the answers to this question.
In my personal experience/opinion, the designer is more trouble than it's worth when working in C++/CLI. I would strongly consider making the necessary modifications to your form classes by hand and not letting the designer bungle your code in the first place. "If it ain't broke, don't fix it."
I'm a long time Eclipse user trying to learn to Visual Studio. I know that Eclipse had Code Templates that would allow you to build classes with certain comments and formatting already added for a class.
For example:
Auto placing the copyright for the code at the top of the file
Who created the file
Predefined Comments,
etc...
Does Visual Studio 2005 have any functionality like this?
It depends. Visual Studio has a built-in code snippets manager that lets you do things like this to at least a degree (i.e., if you insert a code snippet, it'll be formatted as the snippet specifies, but if you write the same code manually, it won't). Also note that there are limitations on the languages with which you can use code snippets.
Outside of that, most of the major add-ins for VS (e.g., Visual Assist-X) provide their own ability to store and insert bits of code, formatted as you specify. Most of these provide at least some features missing from the built-in snippets manager such as working with other languages or being easier to access (along with quite a few other things -- IMO, VS borders on completely unusable without VA-X).
I would recommend looking at item and project templates in Visual Studio, which sound like what you're looking for. But, in your particular case (C++ development), it doesn't look like this is available to you.
The following MSDN article refers to VS templates, and mentions that for Visual C++ projects, that the template architecture isn't supported. Instead, there's information on creating custom wizards for your project and classes, which may give you the flexibility that you need. Sounds like it'll do what you want it to do, but it's much more work than it would be if you could use an item template for including basic comment structure for a default class file.
http://msdn.microsoft.com/en-us/library/6db0hwky%28VS.80%29.aspx
I've become accustomed to using ReSharper, so uninstalling it is not an option.
However 1 little thing that I would like to try fix is the immediate window, I used to get automatic intellisense prompts when for example typing myObject.
That seems to no longer be working (and only in immediate window while debugging) since I installed ReSharper. Any ideas on how to get it back?
Unfortunately, if you're using the ReSharper intellisense (instead of the Visual Studio one), it won't work. I remember reading somewhere that this is a known issue due to a limitation in the Visual Studio extensibility API. This also affects the watch dialog.
The only thing you could do is manually invoke intellisense each time using Ctrl-Space. Perhaps this issue will be solved in Visual Studio 2010.
The problem is ReSharper and there is no current any solution.
And the shortcut for intellisense-pop is Ctrl + Space, (not Ctrl + Alt + Space)