I'm primarily a Java developer and I've recently started developing apps for Windows Store using Visual Studio 2012. When I started coding several years ago, I used Visual Studio 2008. I didn't think anything of certain features until I started doing Java in Eclipse. Anyway, in Eclipse, I can press "tab" to jump out of quotes or brackets. The only Visual Studio 2012 feature I could find remotely similar to this was included in Visual Studio 2012 Productivity Power Tools. It allows me to do Shift+Enter anywhere on a line, and it'll add a semicolon to the end of the line and go to the next one. While this is useful, it's not ideal in many situations. I am also using Resharper and have found no such setting in there. Thanks
The easiest way to jump out of the automatically inserted quote or bracket is to type the closing quote or bracket, i.e.: " followed by " or ( followed by ). You could also use the right arrow key. If you have resharper then you can use CTRL+SHIFT+ENTER to auto complete the current statement.
If you are a fan of keyboard shortcuts to move around your code then try the VsVim Extension.
Related
This started happening for me in Visual Studio 2019 but does not happen in 2017. I cannot figure out how to stop it.
Something I do all the time is make use of Resharper's reformatting. Suppose I have little block of code like this:
Scan = scan;
Target = target;
IsDone = true;
ShouldAlign = false;
I want to align it up to look all nice and neat. So I select my block of code and I either use the menu or a keyboard shortcut to invoke Resharper's autoformat to line up the equals signs. Voila! Looks great, Here is the reformatted code, exactly as it appears, right after I've reformatted. Note the code is still selected:
But then all I have to do is I click anywhere else in the whitespace of that document, and Boom! Everything gets undone
It is as if VS2019 runs its own "Format Selection" command when I click away But I never did that. (but if I manually do, it has the same effect)
However if instead of just clicking away on the whitespace I, click the menu area of Visual Studio and then click the document whitespace, no problem. No reformat.
Just now I've just finished comparing Visual Studio 2017 and 2019 editing settings side-by-side next to each other. I've compared every single edit/formatting/spacing setting I can possibly find. Both Visual Studio's and Resharper's. They are identical except in those few cases where VS 2019 has some new setting that 2017 did not.
This still happens even when all of VS2019's "automatically format" settings are off
I'm asking the same question of the Resharper folks but I think it has to do with the interaction of the two.
Is anyone else seeing anything like this? It's driving me nuts.
After several hours of this, I have finally discovered that that problem was neither Visual Studio nor Resharper. It was actually a THIRD extension I use (also very common) for C++ files called Visual Assist".
VA has its own "format after paste" option. I am guessing that it must detect the reformat/click away as a "paste" operation and it reformats it according to Visual Studio's settings.
Once I disabled that in single, Visual Assist option VS2019 (as I apparently already had in 2017) everything worked well.
I write C#, UnrealScript and C++. I do C++ and C# in Visual Studio 2012, while I do UnrealScript in Sublime 2 with UnrealScript IDE plugin
In Sublime 2 there is a cool effect that shows the line connection between the open and close braces as shown in the image:
( Note: I'm not talking about the underlining of the braces - VS already has that feature. I'm referring to the dotted lines )
I can't find a way to have this in Visual Studio, the closest so far is Show White Space which while is OK, I don't like it that much. Is there a way I can have this feature? Plugin or otherwise?
Try installing a free version of DevExpress Plugin for Visual Studio. Its got all those designes....
I have been looking high and low for a way to auto collapse to definitions in visual studio 2012 when you open a file.
I found a solution for VS2010 here Any way to auto collapse to definitions whenever you close a document? but that requires a Macros which has been taken out in VS2012.
Any Solution would be much appreciated!
Yes, macros are definitely gone from Visual Studio 2012.
Not exactly what you requested, but the Ctrl-M, Ctrl-O keyboard shortcut is fast.
Third party tools like CodeRush! or Resharper may help here. I know that CodeRush is very customizable.
You can also create your own Visual Studio Extension. Extensions are more powerful than macros, but have a bit of a learning curve.
Is there any way to get line ending glyphs in Visual Studio 2012?
The following screen shot (from notepad++) show what I want (the CR LF part):
You might want to check out this extension: End of The Line by Rolf W. Rasmussen. The current binary version displays CR and LF identifiers at the end of the line all the time, but the source version ties it into VS's "View Whitespace" menu option.
It's for Visual Studio 2013, but it's open source and should be fairly straightforward to recompile as a VS2012 compatible plugin
(You might need to change the references - the VSSDK packages on nuget can be really useful here. You'd need VSSDK.CoreUtility and VSSDK.Text. In fact, that might be worth a PR regardless...)
Nope, Visual Studio has no feature to show End of Line Markers. (Reference)
But it gives the ability to show Whitespace with (Ctrl + E + S) which is adressed here.
If any incosistencies are included, VS should suggest to fix the document automatically.
But if you need to do actions other than that, I recommend using notepad++ as described by Hanselman here
If you think Visual Studio should include this feature, you better vote for this request
Edit:
By the way, VS shows glyphs for wrapped words by enabling through:
Tools -> Options -> Text Editor -> All Languages -> Show visual glyphs for word wrap
Like:
I've become accustomed to using ReSharper, so uninstalling it is not an option.
However 1 little thing that I would like to try fix is the immediate window, I used to get automatic intellisense prompts when for example typing myObject.
That seems to no longer be working (and only in immediate window while debugging) since I installed ReSharper. Any ideas on how to get it back?
Unfortunately, if you're using the ReSharper intellisense (instead of the Visual Studio one), it won't work. I remember reading somewhere that this is a known issue due to a limitation in the Visual Studio extensibility API. This also affects the watch dialog.
The only thing you could do is manually invoke intellisense each time using Ctrl-Space. Perhaps this issue will be solved in Visual Studio 2010.
The problem is ReSharper and there is no current any solution.
And the shortcut for intellisense-pop is Ctrl + Space, (not Ctrl + Alt + Space)