Seems like in visual studio folding/unfolding a section is considered an undo "step".
That is if I fold a section then press undo it will unfold it. The same goes for redo.
To me this is highly confusing, folding/unfolding is navigation and should not be considered for undo/redo.
Is there a way to change this behaviour ?
I have the Disable Outlining Undo extension that prevents it.
Related
In Visual Studio, there's a button on the toolbar with tooltip:
Toggles between suggestion and standard completion modes. (Ctrl+Alt+Space)
My guess is that these have something to do with IntelliSense, but I'm not sure.
What is suggestion mode and what is standard completion mode?
The difference seems to be in whether completion is committed when you type keys that are not explicit commit keystrokes while typing. Tab is an explicit commit character; . and ; are examples of keys that are not explicit commit characters.
If I type "foo".sub( (in C# as an example) the behavior will be as follows:
with the button enabled (suggestion mode), I will get the same literal output with a closing parenthesis added: "foo".sub()
with the button disabled (standard mode), it completes using the best match in the completion list: "foo".Substring()
Turning this behavior on is more suitable in languages or projects where you are invoking dynamic (or new, not-yet-existing) methods and properites that are not present in the completion list, so that you don't have to fight with undesired partial matches.
I am not sure what is the best way to word my question correctly in single line. But basically I have seen quite a few video tutorials now where the coder types really fast using some sort of shortcut to fill in the automatic text(prolly intellisense stuff) It looks very similar to Linux command line tab where you only type half of your text and when you hit tab it either fills in the gap or show you the remaining options.
Hope that makes sense.
Thanks
Pressing Ctrl+Space completes the current variable/class you are typing.
Typing things like ctor and then pressing the Tab key twice tells Visual Studio to insert a constructor for you. (Also works with for for a for loop, cw for a Console.WriteLine();, etc.)
For a full list, please refer to the official reference from MSDN.
I believe its Ctrl-Space, which is pretty common among most IDE's
I worked with Resharper 5 before and when I have a problem in code (for example unsuitable space around a parentheses), I used Alt+Enter and Resharper fixed the problem. But in V6, this doesn't fix the problem, it generate a supress statement! What should I do?
Here is more detail:
1- I have this line in my code:
if (this.RequestClose!= null)
Resharper draw a blue line under it and warn that the space around != is not correct.
In Resharper 5, I could press Alt+Entyer two times to fix the spacing problem. In Resharper 6, if I press Alt + Enter two times on this line, nothing happens.
2- I have this line in my code:
var view = new AddressDetailView();
view.DataContext = viewModel;
Resharper suggests using object initializer, but pressing Alt+Enter twice doesn't fix it.
Resharper 6.1 solved this problem!
Did you actually look at the menu item you're selecting? (I'm guessing not, since your question includes no mention of what's in the menu.) Alt+Enter brings up a pop-up menu, you know. By pressing Alt+Enter twice, you're just selecting the first item in that menu.
ReSharper 6 has new features, therefore it has more options in the list, therefore the order is sometimes different. The quick fixes are almost certainly still working; it's just that the first quick-fix in the list isn't always the same one as in R#5.
The solution is simple: read what's on the screen before you select it. If the quick-fix you want isn't the first in the list, then cursor to the one you want before you hit Enter.
(There's never been a ReSharper version where it's safe to always accept the first item in the menu -- the options change depending on whether R#'s background scanning has completed yet or not. If you've been blindly accepting the first item every time, I'm surprised you haven't gotten bitten before now.)
I could not find any way to fix this problem and decided to use R# 5.1 with Style cope instead.
Does anybody know a light plug-in that do (same as Resharper) go to implementation and the quick search for a file where you just insert few characters and it shows the matches? I just want to get rid of Resharper cause it slows me down a lot!!
To answer the original question, as per this post by Andrew Arnott, you can use Ctrl+/ to move the cursor to the Find text box in the toolbar, then type ">of" and start typing file names. The matching files will appear as you type.
Using the ">" prefix causes the find text box to act as the command window would.
(Note that the Ctrl+/ short-cut may be overridden by ReSharper to comment a line of code, so this short-cut only works with ReSharper uninstalled.)
That's interesting. I use ReSharper and it uses about 400mb of RAM. I would consider that pretty low usage.
Maybe you can look into Productivity Power Tools (I don't use it).
http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/
Is there the way to apply "greedy" behavior to and keys in Visual Studio? By "greedy" I mean such behavior when all whitespace between cursor position and next word bound can be deleted using one keystroke.
Well, I don't think you can change the binding of the delete key or backspace key - but CTRL+DEL & CTRL+Backspace are pretty close to what you want.
You can use Ctrl+Shift+Arrow keys to make the selection and then just hit Delete. You may need to hit the arrow key more than once while still pressing Ctrl+Shift combination but because the fingers are in the same position is very fast. This works also for selecting words incrementally.
Actually, you will need to do this: Ctrl+Shift+Left+Right - this will give you only the space selected, and then you can press delete.
This is assuming that you are coming from the right, and you have to delete the space to the left.
Of course, this is still 5 keystrokes... but it beats pressing backspace again and again....
Just Ctrl+Backspace...
Ctrl+Back Space and Ctrl+Delete are also greedy, they delete the nearest word in their respective direction.
You are looking for:
Edit.DeleteHorizontalWhiteSpace
I have it set to Ctrl+K, Ctrl+\ which I think is the default, but might not be
Sounds like something you could write a macro for and then assign to a keyboard shortcut (like SHIFT+DEL).
If you explore the EnvDTE namespaces you can do a lot to make changes to text in the active document window. I'd start by checking with something like...
Public Sub RemoveWhiteSpace()
DTE.ActiveDocument.Selection.WordRight(True)
DTE.ActiveDocument.Selection.Text = " "
End Sub
That's just a simple example, but you can extend it further pretty easily
As of recent, ReSharper has this as an option. It's on by default, which led to this Q&A: Visual Studio recent "hungry" or "greedy" backspace behavior update?
Perhaps this doesn't qualify as applying the behavior directly in Visual Studio, but it's good to know about.
OK I've got this < Ctrl > thing. And applying this knowledge I've found corresponding VS commands: Edit.WordDeleteToStart and Edit.WordDeleteToEnd.
I've successfully remapped < Delete > and < Backspace > keys using Options->Environment->Keyboard dialog. Unfortunately this commands apply not only to whitespace as I'd wish to, but still, thanks everyone!