如何禁用或隐藏滚动条/小地图? [英] 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.
也不能像 Atom 那样只编辑编辑器的 CSS.
Can't just edit the editor's CSS like Atom, either.
推荐答案
移除小地图
将以下内容添加到您的 settings.json
文件
"editor.minimap.enabled": false
请注意,正如在另一个答案中指出的那样,此过程现在已简化为:
View->Show Minimap
移除概览标尺
将以下内容添加到您的 settings.json
文件
"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:
彻底去除滚动条(需要重启)
如果您想完全删除滚动条,请将以下内容添加到您的 settings.json
文件中(注意编辑器会说未知配置设置" - 忽略这一点.它仍然可以工作):
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:
这篇关于如何禁用或隐藏滚动条/小地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!