SSMS 2016 - Enhanced Scrollbar

Introduction

It’s not new to the developers who prefer to develop their application using probably the world’s most advanced IDE, Visual Studio. Now, if you already have noticed the splash screen that appears at the time of opening SSMS, you might have seen the bottom line “Powered by Visual Studio”. It means one should not be surprised to see the IDE features of VS are making their way to SSMS gradually as SSMS is now built upon the Visual Studio Isolated Shell.

SSMS
(Figure 1)

Enhanced vertical Scroll bar

Let's quickly have a look at how the vertical scroll bar looks like if configured to different sizes.

SSMS
(Figure- 2)

Now, that you have seen a glimpse of how the vertical scroll bar in SSMS looks like, let’s get into the details of these Views and make most of these features.

Follow these steps to open the configuration window-

Tools > Options > Text Editor > All Languages > Scroll Bars

SSMS
(Figure-3)

Before we discuss further let’s understand what Annotation means,

Annotations

In SSMS annotations on the vertical scroll bar are the visual indications/symbols to have a bird's eye view of the change made to the current query window. These are small color markers on the vertical scroll bar indicating various things like breakpoint, current caret position, errors, code changes etc. You can easily navigate to these positions of your query by scrolling down to the marked positions. This feature is particularly very helpful when you are writing/editing a long query/stored proc/function etc.

You can hide/show the horizontal and vertical scroll bars using the first two checkboxes on this screen. Then there are two distinct sections, i.e., Display & Behavior. The Display section is all about customizing what annotations you want to show or hide on the vertical scroll bar. The default is, all the annotations are enabled. The second section, i.e., Behavior section is about configuring the different behaviors of the scroll bar such as width, mode etc.

Let’s understand what each of these elements is for,

Note

The number in the numbered list corresponds to the number in the above figure-2.

  1. Show annotations over vertical scroll bar

    SSMS

    By default, this and all its sub-elements are set to show on the scroll bar in SSMS 2016. So, without making any changes, you should be able to see these color marks. Unchecking it will disable all the annotations on the scroll bar.
  1. Show changes
    When this is enabled, you should be able to track the changes done, i.e., which portion of the query is saved and has been changed after the last save. You may refer to the image on the right side where the green colored portion marked with “a” is the section which is already saved and the portion with yellow color and marked by “b” is the potion which is changed after the last save.

  2. Show Marks
    Shows the marks for breakpoints and bookmarks when enabled as shown in the above image marked with “c” in maroon color indicating the breakpoint while “d” in black color is the indication of the position of the bookmark.

  3. Show Errors
    It indicates the positions of the errors if any in the current query window. The red colored mark, “e” is an example of such.

  4. Show caret position
    Shows the current position of the caret marked with a single horizontal line over the vertical scroll bar in the above image as “f”.

  5. Use bar mode for vertical scroll bar
    This is the default behavior you will see in SSMS. This is the old vertical scroll bar with annotations.   

  6. Use map mode for vertical scroll bar
    With this mode, you can customize the vertical scroll bar to different width and can preview the code by just hovering over the vertical scroll bar.

    SSMS

  7. Show Preview Tooltip
    When this is enabled, you will be able to preview the code like a tooltip when you hover the mouse pointer over the vertical scroll bar at the respective positions as the image on the right side.

  8. Source Overview
    You can see the code overview on the scroll bar by customizing the width to following available options as shown in figure -2

    1. Off
    2. Narrow
    3. Medium
    4. Wide

Conclusion

Hope, it will be a great weapon in your arsenal. Please share your valuable thoughts on this. 

Thanks for reading!

Up Next
    Ebook Download
    View all
    Learn
    View all