visual-studio-code

How to remove that tree structure at the top on Visual Studio?


I try to remove that part at the top. If someone has a link to another question that resolve that, I'll be pleased.

Exmaple of the tree

I promise, I've searched online and even on Stackoverflow but I can't find anything about it.


Solution

  • You need to disable stickyScroll. To disable it you can right click on the Sticky Scroll tree and click the Sticky Scroll selection from the open popup. As another solution way, you can apply the following steps:

    1. Open Settings panel from File > Preferences > Settings or the Manage icon at left bottom
    2. Open the settings.json file from the right top corner file icon (Displays this overlay on hover: Open Settings JSON) in the Settings panel
    3. Use this command: "editor.stickyScroll.enabled": false to disable it. If you would like to enable it again, then you can change false to true or remove this command from the JSON file since its default value is already true

    If you would like to enable/disable the stickyScroll feature by using the Keyboard Shortcuts, you can do that in two ways:

    First way: Set it from the Keyboard Shortcuts panel:

    1. Open the Keyboard Shortcuts panel from File > Preferences > Keyboard Shortcuts or the Manage icon at the left bottom or just use the Ctrl + K + S keyboard combination
    2. Search the View: Toggle Editor Sticky Scroll or editor.action.toggleStickyScroll command in the search bar. It has no keybinding as default. Click on the related command line and set a keyboard shortcut. Then, you can enable/disable the stickyScroll feature by using this keyboard shortcut

    Second way: Set it from the keybindings.json file:

    1. Open the Keyboard Shortcuts panel from File > Preferences > Keyboard Shortcuts or the Manage icon at the left bottom or just use the Ctrl + K + S keyboard combination
    2. Open the keybindings.json file from the right top corner file icon (Displays this overlay on hover: Open Keyboard Shortcuts) in the Keyboard Shortcuts panel.
    3. Then, you can add this command to the keybindings.json file by using the following configurations:
    {
       "key": "Write your shortcut combination here",
       "command": "editor.action.toggleStickyScroll"
    }
    

    Hope, it's clear and helpful