Disable shortcut in Visual Studio 2017 [duplicate] - visual-studio-2017

This question already has an answer here:
Recent Visual Studio update introduced shortcut used to create closing curly brace on my keyboard: how to find offending command?
(1 answer)
Closed 4 years ago.
When I press the keyboard shortcut CTRL+ALT+SHIFT+] on an Italian keyboard to add a closed curly brace, Visual Studio selects a block of my code instead of printing it.
I have already tried to reset the keyboard mapping on Visual Studio but to no avail.
Other programs works without problems. How can I fix this problem?

It is a new feature appeared in Visual Studio 2017 version 15.8.0.
It is called ExpandSelectionToContainingBlock and it is mapped to the keyboard shortcut CTRL+ALT+SHIFT+] or CTRL+ALT+SHIFT++ (For VS in Italian)
But this mapping has removed the ability, from some keyboards without the key for the closing brace (like the Italian one), to press those keys and get the, indispensable for many programming languages, close curly brace.
As far as I know there are two workarounds
Go to Tools menu and select Customize
Press the Keyboard button
Search for Edit.ExpandSelectionToContainingBlock
Press Remove
or just use the numeric keypad and press
ALT+0125
For Italian readers with the Italian version of VS, the search above at point 3 should be for Modifica.Espandiselezioneabloccocontenitore. I don't know if other languages are affected by this 'translation vice' but it is a thing to be aware of.
The problem has already been reported to MS (Thanks Albireo)
EDIT: It seems that they have fixed the problem, in version 18.5.2 there is anything assigned to the shortcut. But I am not sure if this is an effect of my previous action or if this (no shortcut) is the real default now.

Related

How do I stop Visual Studio 2019 from automatically inserting asterisk during a block comment in C++?

When using Visual Studio 2019, when I hit enter within a block comment in a C++ file it adds a leading * . I've found a solution to this problem for C# at How do I stop Visual Studio from automatically inserting asterisk during a block comment? but the same option is not present for C++ and changing the C# option doesn't disable the feature for C++. This does not occur with Visual Studio 2017.
So when I have:
/*<cursor here>
*/
and I hit enter I want it to look like:
/*
<cursor here>
*/
but instead I get
/*
* <cursor here>
*/
Is there an option somewhere that disables this behavior or another way to do so?
In VS2019, click menu Tools\Options
In the search field up to the left, type comment style
In the tree view that appears under the search field, you should see a few nodes, Select the bottom node in the Text Editor/C/C++ tree (currently named General).
To the right, you'll have a checkbox:
[x] Insert existing comment style at the start of new lines when writing comments. Uncheck that.
Done.
According to the link: https://developercommunity2.visualstudio.com/t/disable-new-extend-multiline-comments-in/1185751
It seems an issue, and the issue was fixed in 16.8. I suggest you could install the most recent release from https://visualstudio.microsoft.com/downloads/. Or you could update your Visual studio.

Visual Studio 2017 15.4 - Ctrl+Click

Since I started using Visual Studio with 2003, holding down control and clicking a piece of text would highlight that word allowing for easy copying and pasting. This was the case until I updated to 15.4. Now the same action turns the word into a hyperlink and takes me to its definition (the same way F12 would).
Does anyone know how to change this to behave the way it has for the last 14+ years?
Open Options -> Text Editor -> General
Uncheck Enable mouse click to perform Go to Definition
This definitely turns this behavior off, but I don't know how to go back to VS 2003 behavior, because I've been using Ctrl+Click to go to definition for a long time with extensions.
BTW, I use double click to select word and triple click to select line.

Visual Studio C++ aggressive intellisense ignores spacebar

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.

Visual Studio 2010 'Go to Definition'/f12 not working correctly [duplicate]

This question already has answers here:
F12 finds all references, not go to definition
(5 answers)
Closed 7 years ago.
I have a rather large VS win32 solution that has multiply projects in it. The main project is an .exe with several other .exe's and .dlls that interact with each other. Up to about a month ago I was able to hit F12 or right click on a function and select 'Go to Definition' or 'Go to Declaration' and poof I was looking at the correct piece of code.
Recently when I hit F12 it produces a list of places, in the 'Find Symbol Results' window, where the function is declared/defined. Which is really annoying!
If I use F12 on a function that is being imported from a dll it takes me to that declaration/definition no problem. F12 only seems to have a problem with bringing up the code in the current project, which is set as "Set as startup Project". This is a c++ solution and a lot of these functions are overloaded, but still as I said a month or two back I had no problem of F12ing to the correct function/code.
Any suggestions as to what might have happened.
Thanks
Check Tools->Option->keyboard->find Command(Edit.FindAllReferences)
your shortcut key f12 might be assigned to that
to resolve in keyboard ->find command(Edit.GoToDefinition) -> assign f12 in global
Remove all other Works assigned this shortcuts key
(Shortcut currently used by dropdown)
F12 finds all references, not go to definition

Why am i a getting little green dashes and a green box in my code in MVS 2010? [duplicate]

This question already has answers here:
How to change Visual Studio whitespace settings?
(4 answers)
Closed 8 years ago.
I am new to c++ and I am having a problem with Microsoft visual studio (2010). I know there are supposed to be better c++ ide's but this is the one my school has us use. So, my problem is:
There is a little green box appearing in the text of my code file. It is pretty small, but I cannot erase it. It is always there in the top corner and moves to the right of my code as I type. Additionally, when I try to make a space I get a little green dash instead. Why is it doing this and how can I fix it?
Before this started my laptop windows key in between the ctrl and alt button got stuck and I had to turn off the computer and brute force it back into place. I am assuming it is possible that before I did that I may have inadvertently turned on something that I don't want or understand!
Thank you in advance for help.
edit - Here is a link to a picture: http://imgur.com/CM2NqvY
It sounds like you have Visual Studio configured to show whitespace and some non-printable characters.
I don't have access to my VS to check how to enable/disable this option, but I am pretty sure it is under the Edit menu. A quick search yielded this StackOverflow question: How to change Visual Studio whitespace settings?