In Visual Studio 2019, is it possible to remove entries from Intellisense? - visual-studio

I previously used VS2010. Everything worked fine there. I like my intellisense to automatically accept the top entry when I press space or ;. This is part of a workflow that has served me well for almost 20 years.
With VS 2019, if I type
bool myValue=true;
Since I don't by habit capitalize true, Intellisense immediately replaces my line with this:
bool myValue=truespeechwaveformat_tag;
So... I don't want to kill of Intellisense's behavior-- I just want to say "never, ever, for any reason, suggest truespeechwaveformat_tag" since I have not in my entire career ever used this structure, and will not be starting now.
Is there a way for me to delete that permanently from Intellisense's database? Or put it on ignore?

Is there a way for me to delete that permanently from Intellisense's
database? Or put it on ignore?
truespeechwaveformat_tag seems to be a struct of the file mmreg.h which is from the head file mmreg.h. In VS2019, the Intellisense is a bit different from VS2010.
You can try these:
Suggestion
When you type some letters of true, such as t and r, then the intellisense will lock the true entry in the Intellisense, then use Tab key rather than Space or Enter, Intellisense will choose the entry that best matches. And it works well in my side without any trouble.
In additon, if you still face this abnormal behavior, i think it could be related to VS extensions or some your extra settings.
1) reset your VS settings by Tools-->Import and Export Settings-->Reset all the settings. It will also backup your current settings at the same time and you can 9import it as you want.
2) disable any third party extensions by Extensions--> Manage Extensions-->Installed.
3) delete the .vs hidden folder under the physical path of the solution
Hope it could help you.

Related

Visual Studio doesn't remember changes to settings

I've noticed that my VS15 forgets changes I make to the settings in options and check boxes under Tools on reboot.
For instance, when I exchange a string in a document, I get the pop-up telling my how many substitutions have been made. There's the check box showing/hiding this message next time. I uncheck it and fairly enough the pop-up doesn't come up again. Until I restart VS, that is. After that, the pop-up is back!
The same goes for many other options (typical NuGet packages' suggestion based on the contents of CSHTML-file, for instance). However, all the settings I make in Resharper menu are remembered. Also, the key short-cuts seem to be remembered.
I restarted, updated and reinstalled - no luck there. Starting VS in admin mode gives no change, neither. I noticed that if I change the values in the registry, the changes are effective in VS. It's like VS won't write the modified settings to the registry by itself (and I'm damn sure too chicken and too lazy to horse around in the registry for that).
Has anybody else experienced that?
What more can I do to diagnose it?
How do I kill the problem?

VS 2010 C# Express - Intellisense not showing all options

I am having a strange problem with IntelliSense in Visual Studio 2010 C# Express Edition: when it pops up to show me the list of suggestions, the list is missing valid options.
For example, say I want to add a "KeyDown" event handler to a control, I start typing "someControl.K<Ctrl+Space>", but the popup doesn't list the KeyDown event; actually, it does not contain anything starting with a K (not KeyPress or KeyUp either).
This is not so bad, since simply typing "KeyDown" by hand won't kill me, but it is highly irritating, especially when I am dealing with objects whose members I am not familiar with.
After all, one of the uses of IntelliSense is giving you a quick overview of what Methods/Properties/Fields/etc. the object has to offer - but if it leaves out some of them semi-randomly, that point is rather moot.
(By semi-randomly I mean that, while there does not seem to be any discernable pattern for which members are left out, at least it is consistent in that it is apparently always the same ones that are missing.)
Does anyone have any idea what might be causing this phenomenon? A corrupt IntelliSense cache? Is there a way to purge that cache and force a rebuild?
You could try to delete the .sdf and .suo files of your solution (after closing it) and then reopen it.
Also make sure that all Statement Completion options are checked and 'Hide advanced members' is unchecked (see picture).

My open documents(tabs) keep disappearing in VS2010 SP1

In VS 2010, after I would close my solution, and then re-open it the next day, all the documents that I had open, would still be open. Just what I wanted.
After installing SP1, every time I open my solution, all my documents are closed, no matter what state I left them in.
Is this expected behavior, a bug, or is there a setting I don't know about? How can I get my documents back?
EDIT 29-Mar
Re-installing VS2010 and SP1 did not resolve this issue.
Building on top of SteveBob's answer, just do a Window -> Reset Window Layout
This should fix the tab problem. There is of course the side-effect that you'll have to redo/re-add all the windows ( output, solution explorer, properties, find, watches, immediate, etc)
Backup your settings then do a devenv.exe /resetsettings.
It appears that there is not an adjustable setting that controls whether or not the open documents are remembered. By default, Visual Studio stores this data and then re-opens the documents that were open the last time the project/solution was closed. As pointed out by some links referenced by Stuart Dunkeld, it takes a Macro in Visual Studio to override this default behavior.
My problem appears to be that my 'Settings' had become bloated/corrupt. Based on the suggestion of Luke, I exported my settings, then did a reset. This restored the default 'Remember Open Documents' behavior. Then after much fooling around, I was able to import (almost) all of my old settings and still not mess up the proper document behavior.
When importing my settings, I selected everything except the 'Window Layouts' settings.
This restored my existing settings, while keeping the default Visual Studio behavior of remembering which documents were open.
I then re-exported my (fixed) settings so that I had a backup. That's when I noticed that my old, possibly corrupt exported settings file was 8.6MB, while my new, correct exported settings file was only 0.2MB.
After examining some of the differences between these two settings files, some of the information leads me to believe that the installation of VS2010 SP1 had a conflict with the 'Document Well 2010 Plus' feature in the Productivity Power Tools extension, but I cannot positively verify this.
Does it work OK with a new solution? If so, you could try trashing the .suo file attached to your solution.
I keep a lot of files open. Every so often, my VS2012 stops restoring the open files. Opening them again does not help the restore process.
I tried:
All the above suggestions, and all the suggestions I could find elsewhere
In particular: deleting .suo, .filters, .sdf, .opensdf, etc
Plus /resetlayout
Plus /resetsettings(ouch)
And none work for me. Or, at least not reliably.
But I just tried:
Install Productivity Power Tools
Enable Options / Productivity Power Tools / All Extensions / Custom Document Well
Restart Visual Studio
(the PPTools document well saves and restores properly!)
Disable Options / Productivity Power Tools / All Extensions / Custom Document Well
Restart Visual Studio
And now the builtin document well has resumed saving and restoring properly as well! At least for the moment.
I'm guessing that the builtin "document well" was derived from the one in PPTools, possibly causing the side effect of turning the PPTools on and off.
(I could simply use the PPTools document well all the time. But I can't get the colors therein to work to my satisfaction.)
Hope this helps someone.
Have you tried deleting the .suo file? It may have become corrupted.

Why do Visual Studio 2005+ bookmark keyboard Shortcuts go to bookmarks in other documents?

Prior to Visual Studio 2005, the bookmark feature worked perfectly. Then starting with VS 2005, I noticed that requesting the "next" or "previous" bookmark stopped working correctly. Sure it will take you to a different bookmark, but it takes you to a bookmark location that is the least relevant or most obscure based on your current location. Even when I'm sitting on a book mark, and I can "see" the next (and previous) book mark, Visual Studio will still take me to some random far-off bookmark (in an entirely seperate project and file if it can help it).
In fact, the only way I can truly get to the "next" bookmark in my document, is to ensure there are not more than two bookmarks in the entire solution (and both must be located in the current document).
I'm trying to understand how this went so wrong, and if there is some simple configuration setting I can make that will correct the problem. I'm now using Visual Studio 2008 (which has the same problem). I've not tried this in 2010 yet.
Update:
I've discovered that the order which bookmarks are traversed, are the order they are created in. There is a "bookmarks view" where that order can be manually re-arranged. However, in the past the order was always ascending line-number, which was much more useful. So now the question is, how do I modify the behavior?
I think starting with 2005 the CTRL-K+CTRL-N and CTRL-K+CTRL-P shortcuts were changed from "move the caret to the next bookmark in the current document" to "move the caret to the next bookmark".
You can get the old behaviour back by editing the keyboard shortcuts to assign CTRL-K+CTRL-N and CTRL-K+CTRL-P like so:

VS 2010 Editor Behavior

Using Beta 2 of Visual Studio 2010. I'm using C# and have always enabled Virtual Space. A notable difference in this version between past versions is that when I'm at the beginning of a line in the .cs file and I hit the left arrow, the cursor jumps to the line above. Previous versions of Visual Studio would perform no action (i.e. stay at the beginning of the line). I never realized how much I depended on that working as it did until now. Because when it jumps to the previous line, I hit the right arrow key, but being in virtual mode it keeps me on the same line.
I searched and searched for a setting that changes this behavior and compared my Visual Studio 2008 settings to 2010 and couldn't find the magic switch. Is this a setting and if so, what is it?
Thank you.
Looking at the implementation, it appears the current behavior is expected, but is likely not intentionally different than Orcas. It was probably just an oversight when virtual space was (re)implemented in the new editor.
If you want to track the progress of the fix, can you file a bug on Connect? I can file one internally, but you won't be publicly visible. Also, the bug will probably be "Won't Fixed" for Visual Studio 2010 RTM (it's too late to fix now), but the fix could make it into SP1. Please let me know if you don't file a Connect bug, in which case I will file an internal one.
Since VS2010 is still Beta, it may well be a bug. An option could be to export vs2008 settings and import them to vs2010 to ensure you have the correct settings (assuming you haven't changed anything specific to vs 2010).
Are you trying to disable Virtual Space in VS2010?
Virtual Space is enabled in Column Selection mode. When Virtual Space mode is not enabled, the insertion point moves from the end of one line directly to the first character of the next.
Steps here
As the others said, it could be a bug, or an annoying intentional change of behaviour.
But to add to this, I'd say that since VS2003 I have always re-evaluated my use of the IDE (and specifically the key bindings) every time I upgrade.
I find the standard VS behaviour an extremely useful way of getting to the end of the preceeding line. If I want to get to the beginning of the line, I press home (once to get to the start of the code, and again to get to the start of the line), so I never press left-arrow at the start of the line unless I intend to move to the end of the previous line. I would personally find it utterly irritating to press left arrow and have it not do anything - if I've pressed the key I expect it to do something useful.
Perhaps if you spend a few days trialling a new navigation approach, you will discover an easier, more efficient way of using the IDE. You just have to put up with a few days of minor frustration until you can reprogram your muscle-memory. From my point of view, it's always worth a try... (Indeed I've never found a change to a newer key binding set to be a problem at all, apart from the bookmark keys changing from a single keystroke to a double-keystroke. ANd that is easily fixed if necessary by just editing the key bindings)

Resources