I'm missing the suggestions documentation tooltip while doing C# in VSCode and having the C# Omnisharp extension installed.
What is this tooltip called? How can I turn this on?
Current behavior: https://i.stack.imgur.com/kD9E1.png
Wanted behaviour:https://i.stack.imgur.com/qdWYT.jpg
Note that I can see documentation, but only when I hover my mouse over it. Not while I'm typing: https://i.stack.imgur.com/PS1ft.png
C:\>code --list-extensions
77qingliu.sas-syntax
alexiv.vscode-angular2-files
Angular.ng-template
casualjim.theme-desertex
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer
Darfka.vbscript
eg2.tslint
esbenp.prettier-vscode
formulahendry.auto-rename-tag
infinity1207.angular2-switcher
ionceflorin.copy-current-file-path
jchannon.csharpextensions
jmrog.vscode-nuget-package-manager
johnpapa.Angular2
ms-vscode.csharp
msjsdiag.debugger-for-chrome
PKief.material-icon-theme
redhat.java
Shan.code-settings-sync
sohibe.java-generate-setters-getters
vscjava.vscode-java-debug
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
vscodevim.vim
Finally found it. Tap ctrl + space twice! after the dot (.) while typing.
https://code.visualstudio.com/docs/editor/intellisense
"As provided by the language service, you can see quick info for each
method by either pressing Ctrl+Space or clicking the info icon. The
accompanying documentation for the method will now expand to the
side. The expanded documentation will stay so and will update as you
navigate the list.
You can close this by pressing Ctrl+Space again
or by clicking on the close icon."
Related
When debugging in Visual Studio 2015, after jumping from a reference of an identity to its definition, can I jump back from the definition to the previous reference?
Thanks.
Yup. There is a "Navigate backwards" command that will do what you want.
You can see where it is for me and it is part of the "Standard" shortcut bar. It can also be found under the "View" menu or the keyboard shortcut is ctrl+-.
You could try Cntrl + -.
This would bring you to the last position of the cursor.
The original Answer is here
Did I get you right?
For more information on navigation by shortcuts this post is quite helpfull
Assuming that you have been doing things in sequence, you can Navigate Backwards
Keyboard Shortcut
Hitting Ctrl + - (Ctrl and minus at the same time)
Visual Studio Toolbar GUI
Alternatively, you can also do this by hitting the back button on the toolbar
Mouse Shortcut
Lastly, the "3rd" mouse button if you have one, usually on the left side. (The same mouse button that gets your browser to navigate backwards)
void MagicalFunction(MagicalType magic)
{
...
magic.Poof("something");
...
var foo = magic.GetFoo();
...
}
Pressing the hotkey on variable magic would navigate to definition of type MagicalType.
Pressing the hotkey on foo would go to definition of type Foo which is not directly visible here because of type-inference.
Resharper plugin has this functionality (called Go To Type of Symbol) , but is there a built-in alternative or a free-extension that does this?
Right click on the "var" keyword, select "Go to definition" from context menu, and it will take you to the type definition of the inferred type of the variable. I have some tools installed, like Productivity Power Tools which were mentioned, so not sure if this option is available through clean VS2015.
Edit:
You can also with cursor on the "var" keyword press Ctrl-F12 (Go to Implementation), if you prefer to use keyboard. Ref: https://www.youtube.com/watch?v=xWcQhF-1hxA
Sort of.
You could press F12 on "magic" to get to its definition, and then F12 again to get to its class.
Also, while you can't get anything meaningful by F12 on "foo" since it would just highlight the line you're already on, if you F12 from the "var" immediately prior to foo, it will jump you to the Foo class, even though that type is being inferred.
The function you are looking for is "Navigate To".
For some weird reason, the keyboard shortcut was removed from VS 2015. You can see this by going into the Edit menu. The option will be there but has no shortcut assigned to it.
You can fix this manually. The default was:
CTRL + ,
Go to Tools > Options > Environment > Keyboard, search for "Edit.NavigateTo" and reassign the shortcut. You can then place the cursor on the variable and hit the shortcut and a tiny window will overlay on the top right hand corner with possible candidates, one of them being the type definition.
Productivity Power Tools has a feature "Ctrl + Click Go To Definition
This extension gives the editor a web browser by adding clickable hyperlinks to symbols in your code as you hold down the Ctrl key."
https://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef
it deosn't work in the first case but it works very well when you ctrl click "var" in the second case
As far as I know, these are the only keys that react when a button has focus.
Pressing Enter instantly 'clicks' the button, even if you keep it the key down. (So the 'click' happens on KeyDown).
Pressing Space acts more like a normal mouse click; holding it down doesn't activate the Click event, but it does once you release it. (So the 'click' happens on KeyUp or KeyPressed.)
Why the difference? I'd like a good article on the subject or simply a logical explanation as to why those two keys have different behavior. Surely there's an explanation out there!
I can't find any articles explaining this and it's a really good question. I personally think that it's for functionality purposes
Enter Key the classic AcceptButton acts like a FullClick (Click/ClickReleased) that's why if you hold it you will have the effect of clicking multiple times.
Space however is a SingleClick (No click release until you release the key) so it can accomplish task where only a Click is required without a ClickRelease and actions where only the selection of a control is required to activate it. Like the CheckBox or RadioButtons which can't be activate with the Enter but can be activated with the Space like if you click on it.
In conclusion, the Space would be the official MouseClick since it has the same effects of a MouseClick uppon pressing or releasing. Enter would be sort of a shortcut for a One click full click. All, of course, in the idea of giving more possibilities to the keyboard itself.
You're seeing two different behaviors, which aren't associated except that they both deal with keyboard events on a winform.
Enter is special because it's the keypress to activate the acceptButton of a form. In fact, you missed another key that can affect buttons: Esc is the cancelButton, and will throw events as well.
As PhaDaPhunk explained, Space is a MouseClick for any component that accepts a MouseClick, but I haven't found a detailed explanation for it. I'd assume it's the default behavior of all controls. The Microsoft guide to accessibility seems to imply that is so in their section on keyboard-based navigation
Incidentally, this Microsoft support knowledge base entry seems to show that the spacebar implementation went from Button.Click to Button.MouseClick. Perhaps that's the reason for it's different behavior.
This functionality seems to have been removed in Big Sur. I came here looking for how I could get it back. It can be very efficient to click enter to proceed or spacebar usually to cancel, to pick the two primary options on most dialog buttons.
Once code has been written, the only way I know of to view the overloads for a method is to actually edit the method by deleting the Parenthesis () and reopening them.
Is there a shortcut key that I could press to activate this instead of having to edit my files?
For an example, please reference the ShowDialog Overload screen shot below:
With your cursor inside the parentheses, use the keyboard shortcut Ctrl-Shift-Space. If you changed the default, this corresponds to Edit.ParameterInfo.
Example:
Ctrl+Shift+Space shows the Edit.ParameterInfo for the selected method, and by selected method I mean the caret must be within the method parentheses.
Here is the Visual Studio 2010 Keybinding Poster.
And for those still using 2008.
Tested only on Visual Studio 2010.
Place your cursor within the (), press Ctrl+K, then P.
Now navigate by pressing the ↑ / ↓ arrow keys.
The default key binding for this is Ctrl+Shift+Space.
The underlying Visual Studio command is Edit.ParameterInfo.
If the standard keybinding doesn't work for you (possible in some profiles) then you can change it via the keyboard options page
Tools -> Options
Keyboard
Type in Edit.ParameterInfo
Change the shortcut key
Hit Assign
It happens that none of the above methods work. Key binding is proper, but tool tip simply doesn't show in any case, neither as completion help or on demand.
To fix it just go to Tools\Text Editor\C# (or all languages) and check the 'Parameter Information'. Now it should work
Great question; I had the same issue. Turns out that there is indeed a keyboard shortcut to bring up this list: Ctrl+Shift+Space (a variation of the basic IntelliSense shortcut of Ctrl+Space).
The command Edit.ParameterInfo (mapped to Ctrl+Shift+Space by default) will show the overload tooltip if it's invoked when the cursor is inside the parameter brackets of a method call.
The command Edit.QuickInfo (mapped to Ctrl+KCtrl+I by default) will show the tooltip that you'd see if you moused over the cursor location.
I know this is an old post, but for the newbies like myself who still hit this page this might be useful.
when you hover on a method you get a non clickable info-box whereas if you just write a comma in the method parenthesis the IntelliSense will offer you the beloved info-box with the clickable arrows.
Every once and a while the suggestions above stop working, if I restart Visual Studio they start working again though.
you mean's change overload.
just Press Shift + ↑ / ↓
Mine showed up in VS2010 after writing the first parenthesis..
so, prams.Add(
After doings something like that, the box with the up and down arrows appeared.
I am developing the Internet Explorer Toolbar in c#.net using the band objects.
Now in my toolbar, I am using the textbox field to make the search enable, but in this textbox field, I am not able to use the backspace, delete, arrow keys and many other such button.
I am not sure about y I am not able to use this. Please help me about this. I found many question posted over like this, but none of them was having the specific answer.
Thanks
The problem is that the browser is eating the events for those keystrokes, so the solution is to force focus to the toolbar when the text box receives focus.
To fix it add this line to your toolbar's constructor:
yourTextBox.GotFocus += (sender, args) => OnGotFocus(args);
Also make sure you have implemented TranslateAcceleratorIO() per this example.
Compare your code to this one and see what's missing.