如何隐藏VsCode个滚动条?

How to hide VsCode Scrollbars?

VsCode好像有隐藏滚动条的设置:

"editor.scrollbar.vertical": "hidden"

但是,这似乎已被弃用,现在我收到错误 Unknown configuration setting

VsCode有隐藏滚动条的新方法吗?

过去的设定

"editor.scrollbar.vertical": "hidden" 会在 settings.json 中给出 Unknown configuration setting 警告并显示为灰色。但它在重新加载后仍然可以工作。

从 v1.58 开始,

editor.scrollbar.vertical - 'auto' | 'visible' | 'hidden'
editor.scrollbar.horizontal - 'auto' | 'visible' | 'hidden'
editor.scrollbar.verticalScrollbarSize - number
editor.scrollbar.horizontalScrollbarSize - number
editor.scrollbar.scrollByPage - boolean

都在制作“first-class citizens/settings`,无需重新加载或错误消息即可正常工作。

Expose editor scrollbar options and react to them being updated

来自内部人员立即构建:


上一个回答:

可能你能做的最好的事情就是让它们透明:

"workbench.colorCustomizations": {

  "scrollbarSlider.background":"#9aa0",
  "scrollbarSlider.activeBackground": "#f000",
  "scrollbarSlider.hoverBackground": "#ff00"
}

还有几个滚动条颜色属性。