在VSCode滚动条中如何显示范围?

huangapple go评论56阅读模式
英文:

How can I show scope in a VSCode scrollbar?

问题

在VSCode中,有没有一种方法可以通过装饰或不透明度的变化在滚动条上显示当前的作用域或闭包?

我想要一种方法来查看我的“查找小部件”是否位于当前作用域内,通常比屏幕高度更大。

据我所知,在settings.json中似乎没有关于此的设置,但也许我正在搜索错误的术语。

我可以考虑使用扩展,但同样,除非我正在搜索错误的内容,否则这种扩展似乎并不存在。

英文:

In VSCode, is there a way to show the current scope or closure in the scrollbar, e.g. by a decoration or opacity change?

I'm looking for a way to see whether my find widget matches fall within the current scope, which is often larger than screen height.

As far as I can tell, there's nothing in settings.json for this, but perhaps I'm searching for the wrong terms.

I'd be open to an extension, but again, unless I'm searching for the wrong thing, this doesn't exist.

答案1

得分: 1

在滚动条中吗?不是(据我所知)。

但是在标签下面的顶部,它确实为我显示了这些信息,但也许不是你所期望的方式。

在VSCode滚动条中如何显示范围?


编辑

今天在使用VSCode时,我考虑到这一点,并注意到点击函数上的匹配括号会在滚动条中突出显示,以及任何搜索结果匹配。这可能会在不需要任何调整的情况下实现你想要的效果。

在VSCode滚动条中如何显示范围?

英文:

In the scrollbar? No (not that I know of).

But at the top under the tabs it does show this information for me, but perhaps not in the way you are hoping for

在VSCode滚动条中如何显示范围?


Edit

Using VSCode today I thought about this and noticed that matching braces on a function will highlight in the scrollbar when clicked, as well as any search result matches. This might do what you want with no tweaks at all.

在VSCode滚动条中如何显示范围?

答案2

得分: 0

答案是执行与 https://stackoverflow.com/questions/59002585/how-can-i-remove-symbols-on-right-scrollbar-of-vscode 相反的操作:

  • settings.json
  • "workbench.colorCustomizations": {
  • "editorOverviewRuler.bracketMatchForeground"(匹配括号的概览标尺标记颜色)

不幸的是,这仅在光标触及开/闭括号时发生,而不是在光标位于内部的情况下。

英文:

The answer is to do the opposite
of https://stackoverflow.com/questions/59002585/how-can-i-remove-symbols-on-right-scrollbar-of-vscode :

  • settings.json
  • "workbench.colorCustomizations": {
  • "editorOverviewRuler.bracketMatchForeground" (Overview ruler marker color for matching brackets)

Unfortunately, this only happens when the cursor is touching an opening/closing bracket, not when the cursor is in the interior somewhere.

huangapple
  • 本文由 发表于 2023年6月5日 21:58:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76407174.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定