JetBrains Rider "go to source" does not work - c#

I usually use pycharm/idea for python and java etc and I often whack F4 to get to the declaration of a class or method. Intellij calls this "go to source" in the keymap editor.
I just recently installed Rider to do some c# work and immediately found F4 to not work. The key is still bound correctly but I end up having to use Ctrl+B to accomplish the same thing which I thought was super weird and annoying. Ctrl+B accomplishes the same thing in Pycharm and IDEA from what I can tell.
Does anyone know why F4 doesn't work in Rider for c# and how I might go about correcting this? Preferably without having to rebind keys.

Both CTRL+B and F4 works on Rider. But they're available in different contexts. And you need to use both to move around the code.
CTRL+B works when the cursor is on a symbol in the code (i.e. inside the editor). F4 works when viewing quick documentation, in Debugger pane, i.e. outside the editor.

Related

Visual Studio Code: How to show Overloads in IntelliSense?

I am working with the new asp.net core 1.0 framework on Visual Studio Code.
My question is, how do I traverse through all the overloads a method might have?
When at that stage you can just press ( and it will prompt you for the overloads.
Take this example:
I press ( and I get:
If I happen to change focus, I can go back into the call at this.M1( and press Ctrl+Shift+Space (or ⌘+Shift+Space on macOS) to get the overload prompt again:
Pretty much the same as Visual Studio.
This is in VS Code 1.7.1, C# 1.4.1 extension.
I can't comment on the accepted answer but in case anyone has the problem Dawson B mentioned, where you can't navigate the little window of overloads with the vim extension enabled, I found a solution. It was difficult to figure out what that window is called as it's not easy to google, but it is apparently a ParameterHint.
Open the Keyboard Shortcuts with Ctrl+K Ctrl+S, search for "hint", click the pencil to the left of showNextParameterHint, change to Alt+N, and showPrevParameterHint to Alt+P, to not interfere with the Ctrl+N/P binding to Intellisense suggestion navigation. Of course if these conflict with some other extension/custom binding you have, pick whatever works best.

Ctrl+Click navigate to definition off by a few lines

The ctrl+click navigate to definition functionality in productivity power tools seems to have gone haywire. It still kind of works, but puts me a few lines away, and occasionally will send me to the definition of some class defined where the cursor actually ends up.
Any ideas on what might be causing this?
Occurs in vs2013 and vs2015.
I also have ReSharper installed and thought there might be some collision happening somewhere, but can't seem to find anything.
Both ReSharper and Productivity Power Tools use Ctrl+Click as Navigate to Definition. Disable that shortcut in one of them.

Broken "rename" feature

Lets say I have a variable like this :
Now when I rename the variable using the shortcut or menus and press enter, it becomes like this:
The "Show potential fixes" is not due to "Local constant 'renamed' never being used). It asks me to rename the variable again. Why?
I need to click on the "Show potential fixes and choose 'rename variable to renamed'" again. It's very annoying. Is there anyway to fix this?
I just want to use the resharper shortcut and be done with it.
The problem is that in this case for some reason Visual Studio is late to update its code model following the totally legitimate rename operation made by ReSharper.
However, if you ignore Visual Studio's prompt for the second bogus rename and proceed with editing code, Visual Studio will finally understand that a rename has actually occurred and stop asking you to perform it again.
All in all, this is indeed an annoyance but there's an easy workaround: just proceed with editing your code.
We at JetBrains are looking into the problem to see if we can fix it nicely but it's not clear so far if we are able to.

How do I jump between XML doc comments in C#?

OK, this is a silly question, but when using Visual Studio, if I am writing XML doc comments in Visual Basic, I can use the tab key to switch between fields (e.g. Summary to Param to Returns). In C#, however, hitting the Tab key inserts a Tab, so I have to click on the individual fields to navigate to them (or use the arrow keys). This makes what should have been a simple process tedious and time-consuming.
Anybody know if there is a default keyboard shortcut I can use, or if there is a specific command I can map to an unused keyboard shortcut? I am using Visual Studio 2010, with ReSharper 6.1. Did some searching in the SO archives, but either nobody else has this problem, or I don't know the right keywords to ask (the latter is much more likely). Thanks in advance!
EDIT: I should clarify, a bit. The tabbing behavior in VB is native to Visual Studio 2010; the ReSharper install is fairly recent (after I switched to C#), and I wanted to mention it in case someone might know whether ReSharper had added their own navigation shortcuts (as they have tons) for this. Thanks again!
Resharper does have the possibility for structural navigation. Normally you can use the Tab or Shift+Tab Shortcut to the next or previous code element.
If your cursor is in a code element (i.e. not in the whitespace region before a code line) the Tab Key shouldn't insert a tab but navigate to the next section.
Configuration of the structural navigation can be done in Environment|Editor|Editor Behaviour.
If it's still not working as described I'd try to reset the settings (especially those for Resharper) and check wether Resharper is installed properly.
I might be misunderstanding the question, but maybe it sounds like you can just reset your user settings? http://msdn.microsoft.com/en-us/library/ms247075%28v=vs.100%29.aspx ? Or just run a devenv / resetuserdata . Do that, and when you start up visual studio, maybe choose the 'general' settings rather than the C# or vb.net specific ones?

Visual Studio F6 stopped working. It no longer builds the project

I'm using VS2008, been using it for quite some time now, and since I hate using the mouse while developing, I'm always using F6 to build the solution, or Shift+F6 to build the current project. What's weird though is for some strange reason, it simply stopped working over the last few days. In fact, when I pull down the Build menu, next to "Build MyProject" there's no longer a "Shift+F6" shortcut there on the menu?!? Anyone ever experienced this? Is there a setting I need to change?
You can change keyboard bindings in the Tools->Options dialog. It's under Environment->Keyboard.
You can reset the binding here, and also check what might have stolen it by checking what's currently bound to those keys.
If you recently installed any add-ins, they're known to set (sometimes unwanted) keyboard shortcuts.
Your Keyboard Mapping Scheme has changed.
Go to Tools -> Options. In Environments->Keyboard in the dropdown for "Apply the following additional mapping scheme" select "Visual C# 2005"
Have you tried : Tools -> Options -> Environment -> Keyboard
All the keyboard shortcuts have been shown there.
I'll add the proverbial "Is it plugged into the wall" question:
Do you have a fancy keyboard that replaces function keys with other things toggled incorrectly?
VMWare stole my Shift + F6. Maybe that's your prob?
I fixed this by going to going to tool-options-environment-keyboard just like the other suggestions but I clicked "Reset" instead to restore the proper short cuts.
Resharper was annoying about this.
I had to set BuildSolution to f6
then remove F6 from Resharper_Move
Just in case this bites anyone else: Parallels Desktop for OS X grabs F6 and uses it for "Show and hide Parallels Desktop". It can be disabled in Preferences -> OS X System Shortcuts
I know this question already has an answer but it is good to have this here for future reference:
On the Solution properties page, Configuration Properties -> Configuration, the list of projects will be displayed and the last column "Build" will have checkboxes, one for each project.
If they are all unchecked, you will press F6 but nothing will happen. Check the projects you want to build, on that case and you are now good to hit F6.

Categories