10

Is there a quick keyboard shortcut or Command Palette function to quickly jump to the parent/enclosing function?

So if the cursor is in a function, then I want to quickly jump to the first line of that function.

I looked around but was unable to find such a shortcut.

Gary
  • 1,280
  • 2
  • 23
  • 37

3 Answers3

8

Jump to matching brackets is easy!

Stand on some braces(brackets, parentheses) and press: Ctrl+M(Mac ^+M).

File members

enter image description here

Press Ctrl+R(Mac +R) to see list of file members(variables, functions, methods, etc...)

Anton Dozortsev
  • 2,984
  • 18
  • 21
  • `Ctrl`+`R`(Mac `⌘`+`R`) was very helpful for me - I came across this post trying to find a way to see the current "scope" of where my cursor was (ie the containing function). This allowed me to do that and then press `Esc` to get back to the cursor position. – user1063287 Jun 13 '19 at 02:58
2

On Windows, press CONTROL + R which lists all the functions in the file with the current function selected. Now, Press ENTER

ProgramCpp
  • 121
  • 2
0

Sublime Move By Symbols allows you to navigate between symbols, so if your cursor is inside a function, then ctrl+up will move it to the function name.