Dynamics 365 Business Central: Sticky Scroll for VS Code (Hide the ‘header’ lines in the Editor)

Dynamics 365 Business Central

Hi, Readers.
Today I would like to share another mini tip about Business Central, what is Sticky Scroll for Visual Studio Code?
Last week I saw an interesting discussion on X (formerly Twitter) brought up by Steve Endow.

Although Steve Endow in X (formerly Twitter) has already given a solution, I still want to share it briefly in this post.

If you’ve been using VS Code lately, you must have noticed that as you scroll down, the top part of the editor shows ‘header’ lines. For example:

This is the Sticky Scroll feature. Sticky Scroll shows the starting lines of currently visible nested scopes at the top of the editor. It facilitates navigation by indicating where you are in a file and lets you quickly jump back to the top of the current scope.

So when you work in a large code file or scroll through an unfamiliar codebase, sometimes it can be difficult to tell where you are in the code. With Sticky Scroll, you can stick scopes to the top of the editor so that they’re always in view while you scroll through your code. More details: Sticky Scroll
Test video: Multiple code formats are supported, including C#, C++, XAML, and JSON.

This is a very convenient feature. But as far as I know, when viewing BC standard code, this sometimes does not display the correct content. And it takes up part of the area of ​​the edit box which is not very friendly to users with small screens. So some developers may not like it.

It doesn’t matter, this can be turned off by the following ways.

1. You can enable/disable Sticky Scroll by choosing View -> Appearance -> Sticky Scoll

2. You can enable/disable Sticky Scroll with the "editor.stickyScroll.enabled" setting.

When disabled, this section will no longer be displayed.

Great, give it a try!!!😁

PS:
1. Sticky Scroll navigation: It is now possible to focus on the Sticky Scroll lines and navigate with the up and down keys. You can use the Enter key to go to a selected line. To focus on the Sticky Scroll, you can run Focus Sticky Scroll from the Command Palette. Enable the Sticky Scroll UI via the View: Toggle Stick Scroll command.

2. Select default provider for Sticky Scroll: Sticky Scroll (View: Toggle Sticky Scroll) uses several different content models to create its headings. It is now possible to choose between the outline provider model, the folding provider model, and the indentation model to determine which lines to display in the Sticky Scroll UI. If a model is not available for the current language, VS Code falls back to the next model in the aforementioned order. The default model initially used can be changed with Editor > Sticky Scroll: Default Model (editor.stickyScroll.defaultModel).

3. The same functionality is available in Visual Studio, more details: What is Sticky Scroll for Visual Studio?

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL