Visual studio 2022 how to auto complete only on tab? - c#

Right now, visual studio 2022 will auto complete on a whole bunch of characters that I use in normal coding, such as ( and space.If i for example intend to create the method Generate later but add a call to it in my code, typing Generate( it will be replaced with GenerateDocumentationPage() which is completely irrelevant. So then I have to revert and type my function call again. How can I fix this so that it only complete on tab?
I was hoping to find some setting for this under IntelliCode but it seems like there is no configuration for auto replacement there. How can this be solved?

I think I have found the answer in next link:
https://learn.microsoft.com/en-us/answers/questions/760368/disabling-autocompletion-from-spacebar-in-vs-2022.html
ANSWER: Edit -> IntelliSense -> Switch Between automatic and tab-only IntelliSense completion or Shortcut CTRL+ALT+SPACE
Best Regards,
Genís

Related

Visual Studio C# - How do I turn off autocomplete (not intellisense)?

So I didn't use to have this issue as much in older versions, and it even then it was easy to get used to, but i got VS 2019 recently and now when I write code it'll randomly autocomplete half way in and add shit I didn't write WHILE IM STILL WRITING. I don't press enter, I don't click on anything, it'll just add what it thinks I want without any confirmation.
I tried searching how to disable this, but I only ever find how to turn off intellisense recommendations altogether (Tools > Options > Text Editor > C# > IntelliSense). I don't want to disable the completion list from showing up, I WANT intellisense, I just want it to let me code without inserting new code on it's own. Just show me recommendations, don't automatically add them in for me without any input from me.
Edit -> Intellisense -> Switch Between Automatic and Tab-Only IntelliSense Completion
Had the same problem, this worked for me.
I think you want to disable the IntelliCode. you can do it by
Choose Extensions > Manage Extensions, find and select the IntelliCode
extension, and then click Disable
I was running into this same issue with Visual Studio Community using C# and Resharper on a fresh installation.
This seems to occur on writing invalid syntax, Visual Studio replaces whatever is written with it's closest valid guess when the user presses space. Specifically I was typing in a variable without declaring a type first.
output // gets overwritten automatically with XmlOutputMethod
var output // does not get overwritten automatically
Unfortunately, I do not know how to disable this feature in Visual Studio. Hopefully this information is of some use.
I've recorded a short video of my text being overwritten by Visual Studio, which can be found here

Visual Studio Code: How to show Overloads in IntelliSense?

I am working with the new asp.net core 1.0 framework on Visual Studio Code.
My question is, how do I traverse through all the overloads a method might have?
When at that stage you can just press ( and it will prompt you for the overloads.
Take this example:
I press ( and I get:
If I happen to change focus, I can go back into the call at this.M1( and press Ctrl+Shift+Space (or ⌘+Shift+Space on macOS) to get the overload prompt again:
Pretty much the same as Visual Studio.
This is in VS Code 1.7.1, C# 1.4.1 extension.
I can't comment on the accepted answer but in case anyone has the problem Dawson B mentioned, where you can't navigate the little window of overloads with the vim extension enabled, I found a solution. It was difficult to figure out what that window is called as it's not easy to google, but it is apparently a ParameterHint.
Open the Keyboard Shortcuts with Ctrl+K Ctrl+S, search for "hint", click the pencil to the left of showNextParameterHint, change to Alt+N, and showPrevParameterHint to Alt+P, to not interfere with the Ctrl+N/P binding to Intellisense suggestion navigation. Of course if these conflict with some other extension/custom binding you have, pick whatever works best.

Visual studio 2015 smart code completion for referenced assemblies

Is there a way, or free extension, or built in functionality of vs15 that can suggest code completion for types that are just referenced but not included with using?
Great example is the way how does the R# works. It suggest type, and later popup question if you want to add using.
I know that when i type full type name and press ctrl + . it suggest me to import for example Castle.Windsor, but i want it to suggest me type name when i start typing.
This behavior of quick actions(Ctrl+.) is by designed, after your type any characters and hover the mouse on it, there is a light bulb appear in the Visual Studio editor and that you can click to perform quick actions including refactoring fixing errors. Light bulbs bring error-fixing and refactoring assistance into a single focal point, often right on the line where you are typing.
If you want it suggests type when you start input character, it is not supported in VS now. I have reported this suggestion to the Visual Studio Product Team in here: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/17039047-improve-the-prompt-function-of-quick-actions-ctrl, and you can vote it and waiting for the feedback from the VS Product Team engineers and if someone have the same suggestion and they can also vote it.

Visual Studio 2013 stopped showing variable values when debugging

In a particular project I recently started the debugger started acting funny. When I'm debugging and it is paused at a breakpoint, Data Tips don't show up, some of the variable values don't show up in the Locals and Autos windows, and there are some strangely named variables in the Locals window (the ones starting with "CS". The other ones are my variables):
I can't for the life of me figure out what is different about this project than my other ones. I'm running Visual Studio 2013 in Windows 8.1. The project is a Windows Phone 8 project, with the only added references being Fody, PropertyChanged.Fody, HttpClient et alius, and JSON.net.
Any help would be appreciated.
I had the same problem here (also using windows 8.1 and VS 2013)
To fix it you need to open in VS Tools | Options | Debugger | General and enable the flag [Use Managed Compatibility Mode], which essentially gives you the VS 2012 function evaluation behavior.
Reference:
http://weblog.west-wind.com/posts/2013/Nov/21/Visual-Studio-2013-Could-not-evaluate-Expression-Debugger-Abnormality
[Build] => [Clean solution] has fixed this issue for me when nothing else has worked including emptying the symbol cache.
Try TOOLS->OPTIONS->DEBUGGING->SYMBOLS and hit button Empty Symbol Cache.
This did the trick for me (VS 15 on WIN 10):
Debug --> Options --> On General tab check Use legacy C# and VB expression evaluators.
I tried above all suggestions but none of them worked for me. Following resolved my issue -You can try by resetting VS settings. Tools-> Import and Export Settings -> Reset All Settings and then press Next.
If you're referring to the 'locals', you can reopen it (while debugging) by going into Debugging -> Windows
It's only accessible during a debugging session.
I was facing some weird issue on my Visual Studio 2017 (Community) installation while debugging which is how I reached this thread. I'm posting my findings in case it helps someone. Any of the already posted answer's didn't help me.
The thing was whenever I hover my mouse over a variable during a debugging session then I can see its value in tool tip but it was working only for primitive data types e.g. int, char, string etc. In case the target variable was an object or an array I will not see any way to expand the object to see its property values, internal members and things like that as shown in the screenshot below for variable A which is an array:
So to overcome this problem for non-primitive data type variables (objects and arrays), every time I will select the variable and press Ctrl + F9 to open the quick watch window and see the object members there but gradually it was becoming irritating and time consuming.
While trying various solutions present in this thread by mistake I clicked on the empty area beside the variable name in the tool tip window and whoaaa it was all there :)
In general in that empty area on the left hand side of the tool tip window, there is a plus (+) sign which we click to expand the object details but it was just that the plus (+) sign was invisible. I reverted all the options I had applied as per the suggestions mentioned in this thread and it was still working.
So I concluded it was just a curious case of invisible plus sign. Now I've a normal debugging life :P
Root cause of the problem could be Visual Studio 2017 Community (Version 15.3.0) or Windows 7 which is my host operating system(OS). As far as display drivers are concerned then that's not the case for sure as I had built this laptop more than a year back and it had been all good for all other applications.

How do I jump between XML doc comments in C#?

OK, this is a silly question, but when using Visual Studio, if I am writing XML doc comments in Visual Basic, I can use the tab key to switch between fields (e.g. Summary to Param to Returns). In C#, however, hitting the Tab key inserts a Tab, so I have to click on the individual fields to navigate to them (or use the arrow keys). This makes what should have been a simple process tedious and time-consuming.
Anybody know if there is a default keyboard shortcut I can use, or if there is a specific command I can map to an unused keyboard shortcut? I am using Visual Studio 2010, with ReSharper 6.1. Did some searching in the SO archives, but either nobody else has this problem, or I don't know the right keywords to ask (the latter is much more likely). Thanks in advance!
EDIT: I should clarify, a bit. The tabbing behavior in VB is native to Visual Studio 2010; the ReSharper install is fairly recent (after I switched to C#), and I wanted to mention it in case someone might know whether ReSharper had added their own navigation shortcuts (as they have tons) for this. Thanks again!
Resharper does have the possibility for structural navigation. Normally you can use the Tab or Shift+Tab Shortcut to the next or previous code element.
If your cursor is in a code element (i.e. not in the whitespace region before a code line) the Tab Key shouldn't insert a tab but navigate to the next section.
Configuration of the structural navigation can be done in Environment|Editor|Editor Behaviour.
If it's still not working as described I'd try to reset the settings (especially those for Resharper) and check wether Resharper is installed properly.
I might be misunderstanding the question, but maybe it sounds like you can just reset your user settings? http://msdn.microsoft.com/en-us/library/ms247075%28v=vs.100%29.aspx ? Or just run a devenv / resetuserdata . Do that, and when you start up visual studio, maybe choose the 'general' settings rather than the C# or vb.net specific ones?

Categories