As a former Java developer who just switched to learn some C# I find it really irritating that Visual Studio 2022 AutoCompletes its suggestions on pressing anything from a simple "." to "Tab" and "Space" and "Enter".
I would like to keep AutoCompletion feature but make it less aggressive and "enforced". For example I would like to make it work only when I press "Enter". Is there any way I can achieve this?
I tried some googleing, but failed to find anything useful. There is a way to make it work on Tab. But I want it to work on Enter.
I don't think it's possible to change the hotkey for autocomplete in Visual Studio to Enter (at least from the Visual Studio options menu). See this similar question for more details - How to change hotkey for Visual Studio 2022's Intellicode Auto Completion
Related
Is there a way to highlight a piece of code in Visual Studio C# and automatically place a pair of parentheses around the block of code rather than manually put your cursor at the beginning and press '(' and then the end and press ')'?
I've used other IDEs that have had this feature and as simple as it sounds, it's very nice to have.
I'm currently working with Visual Studio 2017.
To my knowledge, Visual Studio doesn't provide that functionality out of the box. However, there are free extensions you can download from the Visual Studio Marketplace that do what you describe such as:
Surround Selection
Selection Wrapper
You can download them from the marketplace using the links above or by searching in visual studio (Menu: Extensions -> Manage Extensions -> perform your search)
Disclaimer I’ve only tried out the first one of these briefly and it appears to work. I will update after checking the second one.
Edit: I've now tried both and both worked. Please note that I use VS2019 so I can't vouch for their performance on VS2017. Of the two options I mentioned, Surround Selection claims to work with VS2017 while the second one only lists VS2019.
I'm new to Rider and in Visual Studio I can press Alt+Enter to correct something to what Visual Studio suggests.
I've tried to illustrate the situation in the picture below. So the editor (ReSharper (?)) suggests I use the wording MyRoom instead (which makes sense for methods), but is there a command to auto correct this as with visual studio 2017? And in that case, what is its name? I've been trying to find it in the keymap but cant find it
I am not quite sure, but there is an extension call IntelliSpell
Easy-to-use, one-click operation to spell-check your Microsoft Visual Studio files, projects, or entire solution.
you can find it here: https://marketplace.visualstudio.com/items?itemName=GrapeCityinc.IntelliSpell-SpellCheckerforVisualStudio
In the Rider help it is written, that you can also use Alt + Enter. You could also try Ctrl + .. If I remember correctly it worked in Visual Studio with Resharper.
It's apparently called "Show Intention Action" and was bound to something weird on MacOS! I've bound it to cmd+enter now. Thank you for your help though! :-)
I was trying to practice keyboard shortcuts to become a more productive programmer. I came across a shortcut that said Toggle Bookmark is Ctrl+K,K. But in my environment the shortcut key is Ctrl+B,Ctrl+T.
I am trying to figure out what is causing this difference?
I am running Visual Studio Enterprise 2015 with ReSharper 9.2 working in a C# web project
I doubt the website is wrong because other websites say the same thing.
Source:
http://visualstudioshortcuts.com/2015/
Different keyboard mapping schemes have different shortcuts, you set the one you want in the keyboard options: the default scheme uses Ctrl+K,Ctrl+K for toggling bookmarks, so you have yours set to one of the others, probably "Visual C# 2005" as per "Bookmark Window Shortcut Keys, Visual C# Scheme"
Maybe it's just a mistake in source? Never actually need this shortcut, but tried
CTRL+K+K instead of CTRL+K, and it works
I have VS 2012 with ReSharper, I also use PRISM. Not sure where it comes from, but I get following choices when placing mouse pointer on a property
I want to edit template used for those, specifically last one (with RaisePropertyChanged(Expression..)
This 3rd option looks prism-specific, but I wonder where it's hooked up? I checked all settings in Visual Studio but can't find it.
It is ReSharper Alt+Enter menu, not Visual Studio one, so Visual Studio does not have an option to adjust it.
These context actions are INotifyPropertyChanged support in ReSharper (more info). Unfortunately, there is no way to edit templates of ReSharper context actions.
I'm using the latest version of Resharper (5.1.3) with the intellisense (Code completion and parameter info). I'm programming in c#. The intellisense of Resharper is very nice and work perfectly when the application is not running but when I run my WinForms project and hit Ctrl+Break (Break all and using edit and continue) to modify some code without stoping the application, the intellisense of Resharper stop working. In this case, I must stop the application, make changes and restart. Ok, I'm able to modify the code while the application is running but without intellisense.
Is this a limitation of Resharper or I have missed to activate or desactivate an option?
Just for the information, I have already desactivate the Visual Studio intellisense and parameter info (Tools>Options>Text Editor>C#>General>Statement completion). I'm using Visual Studio 2010 SP1 with WinForms project like I said previously.
Thank you very much.
It still works if you press ctrl+space yourself. I suppose it's by design, so nothing we can do about that. It still gives the info when you explicitly ask for it by pressing ctrl+space or whatever your keyboard shortcut is, so it's not that bad.