Can resharper navigate to a method? - resharper

I know how to navigate to a file or a class, but can I navigate to a class's method?
Oh and say I am viewing a different class's file

With respect to my correctly configured keybindings, all of the previous answers seem outdated/invalid to me.
I say:
Hit Alt + \ to list all file members.
Then find your method in the list and navigate to it.

If you use "Resharper 2.x or IntelliJ IDEA" keyboard scheme:
Ctrl + Shift + Alt + N -> navigate to symbol
In Visual Studio Scheme:
Shift + Alt + T
For future reference and other options check https://www.jetbrains.com/resharper/features/navigation_search.html

If you are using Resharper IDEA Scheme, do ctrl + F12 and you can enter a member name, fastest way to navigate to a method, property etc on that file

Ctrl + Click (or Right Click > Go To Declaration). Works on Methods, Fields, Properties, Types, and just about everything else.

With VS2015 and ReSharper 10 press Ctrl + T. This will search for types, symbols and files. It will search through everything in your solution.
Update: works the same in VS2017 and ReSharper 2017.2.
You can also press Ctrl + T followed by / mm to search for just methods.

Another tip for the current file is to use the File Structure window - can also drag and drop members around from the window.

I have used Dpack (f/oss) for years and it can go to methods and/or properties by pressing a shortcut and then start typing. For those who get Resharper's ctrl-T working it is like that one but within the file.
Dpack provides the same functionality for finding files and open files. The former is a better version of Visual Studio 2015's ctrl-;.
(I have done some remapping of keys too but in my experience something (resharper?) overwrites my changes from time to time.)
(Also with VS2015 and R#9.2 I think Dpack does a better job at this.)

Related

Shortcut alt+enter is not working in Android Studio

alt + enterfor importing was work normally maybe until I updated Android Studio,
my version now is2.3.3
as this screenshot, I can't press alt + enter at all, knowing that I have tested them on other programs and they are working normally
Use LEFT Alt Key + Enter. It works well in Android Studio 3.0.1.
I encountered the same problem today, this is how I solved it.
Go to File > Settings > Editor > General > Auto Import
Uncheck and Check Show Import Popup
Do Invalidate caches and Restart of Android Studio. (If this option doesn't work, restart your computer
Edit
Another solution I've found to work is to uninstall Android Studio and reinstall it.
Try "the Windows Key + Alt + Enter" if you are using windows.
It feels weird as I am pretty sure my keyboard works fine and android studio settings are alright, but I just see the pop-up suggestion for class import and nothing happens when I press Alt+Enter.
I work on Windows 10 and my Android SDK is on a different hard drive(E:) from the Android Studio installation(C:), not sure if these contribute to the problem.
After some trial and error I accidentally solved the problem by pressing "the Windows Key + Alt + Enter" to conjure the import class menu and could then press Enter again to properly import the suggested class.
In the Android studio Settings/Keymap "shortcut Ctrl+Alt+S"
search for usage of "Alt + Ent" as below image if its not assigned for any action plz go for No. 2
In the Android studio Settings/Editor/Intentions.
Check whatever you want to show Intention in are checked or not as below photo
Double check no.1 is working fine and you found usage of "Alt + Ent" shortcut
[You can find the solution on official Jet brains website]
Intellij IDEA keyboard shortcuts
Intention actions
I faced the same problem and was sure that the problem is in Android Studio. But when I reinstalled it I realized that it did not helped. So I decided to test my keyboard. I found that my left Alt is not working with Enter and right Alt somewhy is turning on Ctrl key. That is why Alt+Enter was not working in any combinations. Problem was solved by reinstalling keyboard driver. Hope it will helps somebody.
Go to File and Unchecked Power Save mode.
For Windows/Linux, you can go to File -> Settings -> Editor -> General -> Auto Import -> Java and make the following changes:
change Insert imports on paste value to All if ask or none to All
markAdd unambigious imports on the fly option as checked
On a Mac, do the same thing in Android Studio -> Preferences
If someone encounters this issue nowadays, for me it was the language change on the keyboard. I must have made some weird keyboard combination that changed the language, therefore ALT + ENTER was not really doing I was thinking it should do. Switching it back to ENG made it work correctly. Cheers.
in Android Studio 3.2.1, the Alt + Enter combination key is only used on the left side of the keyboard.
If you want to use the Alt to the right, it should be manually selected from the section
Settings> Keymap> other
Right-click on the row
show intention action
select add keyboard shortcut
Press Alt (Right) + Enter
I hope this helps
it was the problem with the latest version to...instead of pressing alt+enter. use ctr+o it will open a dialog box then select the method u want to implement and then click on ok button ..its works with all version of android studio.. { Happy coding ;) }
I thought I had the same issue and none of the above fixed the problem. I thought I was using Alt+Enter for Parameter info. Now I use Ctrl+p I get the parameter info for the widget. Not sure if this was changed from Alt+Enter to Ctrl+p but if looking in the File/Setting/Keymap it shows Ctrl+P.
I just ran into this and what worked is Alt+Insert combination
The first thing you have to check is did you put the code inside the onCreate function?
If not put it there and try again. the Alt+ Enter would work after that.
I encountered the same issue after I upgraded Ubuntu. Left Alt+Enter was working but more comfortable Right Alt+Enter did't. Resolved using this solution in AskUbuntu.
In case if you cannot open the link:
Open "Tweaks" (aka "Gnome Tweaks") go to "Keyboard & Mouse" -> "Additional Layout Options" -> "Key to choose the 3rd level" and put a check mark on "Right Alt never chooses 3rd level".
I faced the same problem. Then I found that I was typing the
public void functionName (View view) outside the class. Hence alt + enter did not work.
After I moved the function inside the class, alt + enter worked.
This is a silly mistake though.
In my case (v4.0.0) there was a plugin (CSV Plugin) blocking the shortcut alt + enter.
Generally speaking, my suggestion is to try deactivating all the plugins and see if then it works.
I just pressed alt + f4 to exit and pressed cancel just to check if alt key was working. Fortunately after that everything was working fine.
Go to 1)setting > 2)intensions > 3)checkmark (Dart) and it will work normally without any problem.

Is there a way in Android Studio to use Ctrl+tab to navigate to recently used editor?

Is there a way in Android Studio to use Ctrl+tab to navigate to recently used editor?
Android Studio has two types of switching methods, as can be seen on the keymap settings:
"Recent Editors" - shows a list of recent editors but you need to leave the ctrl key and click up/down keys then another click to select the relevant editor.
"Switcher" - shows a quick list of recent editors. Setting Ctrl+tab to this will behave like many of the other editors in the market: Notepad++, Visual Studio, Eclipse ADT, etc...
You can use Ctrl+E to list last opened or edited files, use arrow key to move up and down.
Ctrl + tab is already doing that! it shows the switcher having the most recently used editor highlighted, after releasing Ctrl key it will switch to the editor, if you keep holding the Ctrl then there are 2 ways to navigate through the switcher, either by Tab, or by up and down arrows with Enter.
Another way is Navigate-> Back/Forward which will move cursor between edit locations in same file and move along to other files, the default key mapping for those are (Alt +Ctrl + Left)/(Alt +Ctrl +Right), which conflicts with windows mapping, Personally I am using Eclipse key mapping, so they are (Alt + left)/(Alt + right).
Don't forget that you can change any key mapping or add an extra key mapping from File->Settings->Keymap

Visual Studio hot key - switch Find context/location

Is there a hot key to toggle the search context/location in the "Find"/"Find in Files" commands (Ctr+F and Shift+Ctrl+F respectively )? I'm talking about the drop down that asks where to search for example Current Project, Current Document, Entire Solution etc.
"Find" is probably my most used feature since working with markup and CSS very often I can't just F12 to a selector definition or Shift+F12 to Find Usages, a regular text search is really the only option and I want to make this as efficient as possible.
Yes, I can tab to it but this takes 6-tabs and if I do it fast, often get the count wrong and prematurely execute bad searches; so it's not cutting it.
If there isn't a hotkey how can I set one? Ctrl + F3 would work well since F3 is "Find Next"
Thanks
I'm not sure if there is a command in Visual Studio that does what you are looking for.
If there is one, you can set the shortcut key in the Tools\Options menu (Environment\Keyboard).
In the screenshot, I'm searching for all the VS command that contain "find". Perhaps one of these is what you need.
Then move to the Press shortcut keys textbox and choose your desired key binding.

Accessing suggested actions in VS2012 using keyboard

When I've added a reference to a class but forgot to add using directive, R# would suggest automatic insertion of it. I'd access that by alt+enter.
Now, I'm on a system without R# and that forces me to use the mouse to unfold that tiny thingy to unfold a suggestion menu. How can I do that from the keyboard? Is it possible at all?
What you're looking for is to expand the Smart Tag menu.
This can be done by pressing the Ctrl + Period (.) shortcut.
You can also use Alt +Shift + F10 shortcut for this.
Edit:
And if by any chance the combo above doesn't work for you, you can re-activate it like this:
1 .
Tools > Customize > Keyboard... (notice the Keyboard... button is at the bottom right of that screen)
2 . Find the View.ShowSmartTag command and set it back to the Ctrl + Period (.) shortcut.

How to remove shortcut command Ctrl+E in Management Studio

I'm really frustrated by this shortcut because I commonly use both Emacs and Management Studio for different projects. However accidentally pressing CTRL + E in MS and expecting cursor to move to the end of the line, which it does in my Emacs configuration, can be really bad in MS if you are programming modifications to a database and, say, are not finished with your WHERE clauses.
I have found no way of redefining CTRL + E to something else, or remove the shortcut entirely. I know I can rightclick the EXECUTE button in the toolbar (no can do in Query menu) and remove the ampersand symbol there but it does not take, CTRL + E still executes my query.
Any help appreciated
For now, there is workaround (map Ctrl + E to some other software):
http://www.sqlservercentral.com/Forums/Topic855640-149-1.aspx
But apparently it cannot be disabled until next version (SQL 2011) :
http://ask.sqlservercentral.com/questions/36303/disable-keyboard-shortcuts
You could install SSMS Tools Pack(it's free). All of its features allow for keyboard shortcut binding, so all you need to do is open the options for one of its features and rebind the shortcut to Ctrl+E. I just tried it now for a coworker who has an identical problem as you. Works great!

Resources