Sublime Forum

Sticky lines

#1

Hi everyone,

I’ve been trying to find a way to emulate this emacs functionality: https://github.com/tuhdo/semantic-stickyfunc-enhance (with demo gifs)

Essentially, while scrolling through a file, I would like the current function’s signature to stay at the top, on a sticky buffer/line. Finding the current function’s signature is a solvable problem, but I can’t find a way to display it in a manner that is similar to how emacs does it.

Is it possible to display a sticky line or buffer at the top of a view? Or is this impossible in Sublime?

Thanks

2 Likes

#2

2 weeks ago, VS Code added their own version of this, and it looks really good.

It’s been a while since this was asked, so I’m also curious. Can a plugin developer emulate this in ST4?

1 Like

#3

That’s something, which would need to be supported by core.

So that would require a feature request, I guess.

0 Likes

#4

I’ve whined (probably annoyingly to the core devs) else where about this … but, IMO, it’s an area that Sublime could really do with some love as a core feature: file navigation and “contextualisation”.

File outlines, for instance, as a core feature would be very helpful. Especially if the information were exposed via the plugin API.

This sort of “sticky” context indicator would really be an extension of such a thing, IMO. And as @deathaxe says above, would almost certainly need to be a core feature for it to be integrated and smooth in the GUI.

Though I do wonder if a plugin that simply displays a pop-up that informs you of the “stack” for the context your cursor is in would be viable. If file outlines were available from the API, I’d say that’d definitely be the case.

I don’t know the API particularly well, perhaps something could be wrangled with the symbol aware functionalities there …?

0 Likes

#5

probably https://github.com/sublimehq/sublime_text/issues/5543

1 Like