Visual Studio C++ aggressive intellisense ignores spacebar - c++

I know this question was asked few times before but there is still no answer. Is there a way to make c++ editor behave like c# one so that it commits intellisense selection when I press spacebar? I've set member list to be aggressive and it works for all characters in "{}.,:;+-*/%&|^!=<>?##\ " except for space. I can commit with spacebar if I press ctrl+spacebar before but I want it to be more automatic, like in c#. I'm using VS2017 but in 2015 it's the same story.

Refer to your description, I tested it in my VS 2017 and got the same result as yours, I have reported it to the VS Product Team, please check this: VS 2017 > C++ > Intellisense: Committed by press the space bar not works even if set “Disable Aggressive Member List” to “True” and you can vote it or add your comments, then we need to wait for the response from the VS Product Team, thank you for your understanding.

Related

Remove type prefixes when passing parameters / fields in Visual Studio 2022 [duplicate]

I recently started using C in Visual Studio, and I've been having an issue where Visual Studio automatically lists the name of parameters in front of arguments to functions. It's possible I unintentionally pressed a key.
Example:
As you can see in the image, the _Format: is being displayed, which is quite annoying. I have browsed through the text editor settings, but I can't seem to find the issue.
I mainly use VS for C#, and so far this only seems to happen with C. Any solution would be appreciated.
First step, go to options. Press Ctrl+Q then type "inline":
Second step, uncheck inline hints:
I use C#, but I think the settings are the same here.
As one answer already stated, this option exists for C#.
But if that doesn't work for C, check the following link:
similar problem
Quote from the linked answer:
"If you're using C/C++ the inline hints works a bit differently. Here alt-F1 or Ctrl-Ctrl can TOGGLE hints."

Configuring Visual Studio 2019 to automatically pick up the highlighted option from intellisense in C++ by hitting enter

The intro text says it all. I tried messing around with options related with the intellisense on VS, but no success. I mean, it does pick our options via enter, but, by the default, we gotta confirm the selection with the arrow keys first, which is an unnecessary step. Any clues?
To implement your idea, you need to set Member List Commit Aggressive to true.
The specific path is Tools->Options->Text Editor->C/C++->Advanced->Member List Commit Aggressive.

Visual Studio 2017 (15.3.1) keeps hanging/freezing

I have recently installed Visual Studio 15.3.1 Community Edition (although I suspect this affects all editions). When doing actions such as
closing SQL .sql file tabs
copying or renaming files
other actions which I can't pinpoint
Visual Studio will freeze or hang for a few seconds or permanantly. It sometimes displays "(Not Responding)" in the title bar, but not always. This is getting really frustrating.
It seems like the Visual Studio feedback system is at fault. Turning it off solved my problem.
Open Visual Studio
Navigate to Help > Privacy > Privacy Settings
Select the "No, I would not like to participate" radio button and click OK
Hopefully whatever bug is causing this issue will be fixed soon and I'll happily participate in the feedback program again!
See this issue posted a lot on the MS forums.
I struggled with it for a while. When editing XAML files, it would always freeze and hang.
Tried many solutions that didn't fixed it. Then, I found the solution that did fix it for me.
I made two changes at the same time, so I can't say for sure which one solved it, but I can guess.
First change, which probably isn't the fix, is that I added the registry keys from this page. They were missing on my system. Page has a lot of detail, but having those keys set properly can't hurt. I noticed in Process Monitor that it was missing on the following regkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup\CachePath
Second change I made, the one I'm guessing solved the issue, was deleting the 17k+ ".TRN" files inside the following directory:
%LocalAppData%\Microsoft\VSApplicationInsights\
On my computer they were in something like the following:
C:\Users\Michael\AppData\Local\Microsoft\VSApplicationInsights\vstelXXX_SOMEGUID
Going back to check now, and after three-or-so hours of work there's another 475 files in that folder. It's producing about four or five .TRN files a minute, all with encrypted data inside. Not going to speculate as to the purpose of it, but I doubt it's anything good or useful. Deleted all those, and the XAML editor in VS now works fine, or at least as well as it ever did. No more 30+ second hangs on a modern twentysome core workstation.
In the recent update of VS 2022, the program suddenly starts freezing (randomly) and the fix for me was to turn off inline hints (the thing that pops up when you double click Ctrl key).
I'm using VS for C++ so I turned it off for C++ specifically
Go to the Tools menu tab -> Options

Commit C++ Intellisense suggestion with space bar in VS 2013

I have recently been exploring C++ some after using C# exclusively for quite awhile. I'm using Visual Studio 2013 and the one thing that is bugging me to death is the inability to commit an Intellisense suggestion by pressing the space bar. I have tried to edit the commit character list in Options -> Text Editor -> C/C++ -> Advanced to accept the space bar but so far I've had no luck. Coming from C# this is very aggravating. Does anybody know if it's possible to make such a change? I know I can use Tab or Enter, but in my opinion using Space is far more fluid.
Any information would be greatly appreciated.
UPDATE: Space seems to commit some suggestions but not others. if I type "std::stri", it commits "std::string". Unfortunately, Intellisense won't commit anything created by me or even common keywords. It just adds a space after what I already typed.
Further to my comment on your question, I have installed the trial version of Visual Studio 2013 (Ultimate), and can confirm that space bar does work to complete IntelliSense suggestions. Combining all comments, it would appear that it works in the following versions:
VS 2010
VS 2012
VS 2013
Here is a screenshot of my IntelliSense settings located at Tools > Options > Text Editor > C/C++ > Advanced:
As a last resort you may want to try changing all your settings back to default, as suggested in this answer:
Tools > Import and Export Settings > Reset all settings
UPDATE: After reading JoshC's comments, I have experimented a bit more and I get the problem too. It appears to be related to whether or not the item you are trying to autocomplete is a member of a type or namespace. If it is (e.g. std::string) then space will work. If it is not (e.g. void) then it will not work (but for some reason, tab will work). As per this link, you can manually invoke the "List Members feature" by pressing CTRL+J in which case on a blank line it will include items which are in the global namespace - however this is clearly not a practical solution.
I have no idea why it discriminates between space and tab in this way. If anyone is aware of a workaround please let me know and I will edit this answer again.
The following would seem to imply that there is no solution for C++:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2656132-support-committed-by-pressing-the-space-bar-in-c
When using Visual Studios 2012 for coding in C++, how do you autocomplete code selected in IntelliSense? (see comments)

Visual Studio 2010 Improperly underlining code/comments with red error line when there is no error

I am working on a rather large project, and I am having strange problems with the IDE in terms of error checking and somewhat with IntelliSense.
Usually if I were to type something boneheaded, like "int a = "aa";", it would underline "aa" in red. However I am seeing VS do this to random parts of my code when I make insignificant changes.
For example:
/*
Some comment here, just going to stretch it out for my example..
*/
int proto1();
int proto2();
If I make changes to other parts of the project, sometimes random functions will get underlined, and even part of a comment. Like just 30 minutes ago it underlined the equivalent of half of that comment beginning in the middle of the word "comment", also it underlined all of int proto1(); and part of int proto2();
I would post screenshots but I am bound by contract not to disclose any work, and I can't easily replicate it in smaller projects.
I don't understand why it does this. When I compile the project, any fake errors and underlining it did goes away and it compiles fine. The point though, is there are no errors. It's making up random errors and underlining random lines/words/half words. I would also like to note that there seems to be a large delay in loading new intellisense information, almost by 2-3 minutes or longer.
I'll try and reproduce it in an unrelated project and post here if I can. However, any help would be appreciated.
Thanks!
*Edit: Forgot to note that hitting the space key several times will on occasion correct the errors however this isn't reliable and does not always work.
Intellisense sometimes can really get stuck with complicated code. I guess until VS2012 release comes out, there's nothing we can do.
There's however one trick that I'm using if this happens - switch your build configuration Debug -> Release and then back again. You don't have to wait, you can just click two times on this drop-down box. It should refresh IS cache and make red error underlines dissappear.
Intellisense is often off, but make sure you have latest updates installed.
I just installed sp1 yesterday and lot of Intellisense issues went way.
I see this is a stale question but some may find this helpful.
I just had this same issue. I tried many of the solutions outlined here and elsewhere. I finally tried running Visual Studio as another user (Shift Right Click Run As Different User) and the issue did not present. I then logged into my computer as another user and deleted the profile of the user I was having the issue with.
If your profile is important to you or there is information within it that is important I highly recommend backing up relevant information first. If you don't understand what information you profile contains make sure you do prior to deleting it.
1) Log in as different user (with admin privileges) than you want to delete
2) Open Properties for Computer
3) Advanced system settings (on the left side)
4) Settings for User Profiles (in the middle)
5) Select the profile you want to delete and click the delete button
6) Reboot
Credit to:
https://superuser.com/questions/63017/how-do-i-delete-a-user-profile-on-a-windows-7-machine-that-is-part-of-a-domain
I had the same issue, and in my case it was mostly related to library functions and types defined in libraries. This one fixed it for me:
Open command line parameters. You can use following to reach there:
Project > ProjectName Properties > Configuration Properties > Linker > Command Line
In the Additional Options box at the bottom add
/I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
You will of course need the correct path where Visual Studio is installed.
Bingo! I hope it works for you too. :)