Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Go to next method shortcut in VSCode

Does VSCode have shortcut to move to next method definition in the same file? I can't find anything like this in settings.

IntelliJ has this feature, for example, you can find this as Next Method in settings

like image 375
Vladyslav Zavalykhatko Avatar asked Sep 24 '17 08:09

Vladyslav Zavalykhatko


People also ask

How do you jump to method in VS Code?

If a language supports it, you can go to the definition of a symbol by pressing F12. Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.

What is Ctrl K in VS Code?

To launch the Define Keybinding widget, press Ctrl+K Ctrl+K. The widget listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout.

What is Ctrl Shift P in VS Code?

You can define a keyboard shortcut for any task. From the Command Palette (Ctrl+Shift+P), select Preferences: Open Keyboard Shortcuts File, bind the desired shortcut to the workbench.


2 Answers

Old question, but I found interacting with the breadcrumb useful. ctrl-shift-. takes focus to the breadcrumb and up and down arrows move through the outline, with the bonus that the editor follows.

like image 191
Malks Avatar answered Oct 04 '22 12:10

Malks


To achieve this I have developed an extension that provides two key commands to navigate up and down through the members in your file.

https://marketplace.visualstudio.com/items?itemName=mishkinf.goto-next-previous-member#overview

Visual Studio Code Extension to navigate through the functions, variables, and classes using quick and easy keycommands similar to functionality provided by IntelliJ IDE's (next/previous function) or Resharper (next/previous member)

Let me know if there any features you would like added.

like image 38
Mishkin Faustini Avatar answered Oct 04 '22 13:10

Mishkin Faustini