Sublime Forum

Show enclosing function

#1

If this already exist, please let me know.

In sublime merge it will show me what function part of the diff is in. This would be really great info to have also in sublime text somehow. To show me what function my cursor is in. I work on a code base with stupidly large functions and I always have to scroll up a mile to find out where I’m at. Having access to that info more easily would be amazing!

1 Like

#2

Goto > GotoSymbol uses the same data as Sublime Merge to determine function definitions. By default it selects the definition that’s above your current text position, so you can easily press enter to effectively goto the function your cursor is in.

1 Like

#3

The point is to always see context without UI interaction or cursor moving away from current “work position”.

related feature request: https://github.com/sublimehq/sublime_text/issues/5543

1 Like

#4

Yes that would be ideal.

I see there’s a sticky lines package. I’ll try that out, but seeing as it’s already in merge I figured it shouldn’t be too complicated to add to text as well.

Even better if it can also show the nested if statements and the like that you’re in.

0 Likes