Removing the file preview on the right side of the editor in VS Code

Click on "File" -> "Preferences" -> "Settings" After Settings open, in "search settings" or press "Ctrl+f" type "editor.minimap.enabled" this will take you direct to the settings. On left of it edited option will be available right click to it. And set it to "false" After wards you can see the right side pane is hide.


This is called the minimap, and, as stated in that link,

If you would like to disable minimap, you can set "editor.minimap.enabled": false in your user or workspace settings.

Once you save the settings file, the minimap will be gone.


You can also toggle the minimap from the Command Palette. You can go to 'View' and select Command Palette or just Ctrl+Shift+P and type in the word 'minimap', you will instantly get the option to toggle the minimap.

minimap toggle option


Ctrl + Shift + P write Toggle minimap and hit enter and it's gone.