Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
637 views
in Technique[技术] by (71.8m points)

visual studio code - How to disable or hide scrollbar/minimap?

I can't find any option, setting, or keyboard shortcut that disables or hides that annoying scrollbar. I just don't find it useful and it's distracting.

Can't just edit the editor's CSS like Atom, either.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Remove Minimap

Add the following to your settings.json file

"editor.minimap.enabled": false

Note that, as pointed out in another answer, this process has now been simplified to:

View->Show Minimap

Remove the Overview Ruler

Add the following to your settings.json file

"editor.hideCursorInOverviewRuler": true

This will keep the scrollbar, but will result in it only appearing when the cursor is within the editor, as seen in the image below:

enter image description here

Completely remove scrollbars (requires restart)

If you would like to completely remove the scrollbars, add the following to your settings.json file (note the editor will say "Unknown configuration setting" - ignore this. It will still work):

"editor.scrollbar.horizontal": "hidden",
"editor.scrollbar.vertical": "hidden"

This will result in the scrollbars not being visible even when the cursor is in the editor, as seen in the image below:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...