Sublime Forum

Anchor/lock Header for top 3 rows in sublime tab

#1

Hi Folks,
I just developed a sublime SQL plugin but one of the feature hasn’t been done yet is lock the column names when scroll up and down


For example, for this dummy data, if I try to show rows below row 43, the top 3 rows for column names will not be visible

What I want to achieve is like this

So my question is how can I lock top 3 rows no matter how I scroll. Is that doable in sublime?

0 Likes

#2

Locking such lines to be always displayed is not directly possible.

There’s an open feature request for sticky scrolling at

0 Likes

#3

Good to hear, hope some day sublime has this functionality, since it looks nicer for some csv data

0 Likes

#4

Still wanna ask, does anybody else know how to sticky first 3 rows in a tab? If we try to view any data in sublime, sticky rows/ freeze rows may be really handy and user will be way happier to use the tool.

0 Likes

#5

As outlined above, there is no native way to do this (hence the post for the feature request to add such an ability).

You can clone the file, split the layout horizontally, then size things to allow you to look at the top three rows in one while you move around in the other, but you would need to poll for scrolling and try to scroll things left/right if the lower view changes.

You could also poll for scrolling and when the view stops add some sort of phantom at the line currently at the top of the window.

Either solution is likely rather janky though (except the split, assuming you do it manually and the file you’re looking at will not need to scroll horizontally.

0 Likes

#6

I think most of the table we query need to scroll left and right, And I have already change the top menu for my bottom view to ‘Query Result’ if that’s the ‘Split’ you refer

The phantom maybe the solution, I will study from the API

0 Likes