简体   繁体   English

小地图上的 Visual Studio Code 突出显示选择(不是滚动条)

[英]Visual Studio Code highlight selection on minimap (not scrollbar)

Is there a way to highlight all matches position on the vsc's minimap when double click a word in the editor?当在编辑器中双击一个单词时,有没有办法在 vsc 的小地图上突出显示所有匹配 position?

I have tried select highlight in minimap , but it renders the highlight on the scrollbar instead of the minimap as figer 1.在 minimap 中尝试过 select highlight ,但它将滚动条上的高亮而不是 minimap 渲染为图 1。

Does anyone know a way to achieve my requirements, thanks!有谁知道实现我的要求的方法,谢谢!

There is an extension of visual studio named RockMargin as figure 2.有一个名为RockMargin的视觉工作室扩展,如图 2 所示。

在此处输入图像描述 Figure 1.图1。

在此处输入图像描述 Figure 2.图 2。

Update: the author of extension select highlight in minimap replied it's not possible to edit the minimap rendering for the moment(202004).更新:扩展select 在小地图中突出显示的作者回答说暂时无法编辑小地图渲染(202004)。 Hope it can be realized in the future T_T.希望以后能实现T_T。

You can try these in your colorCustomiztions in settings.json:您可以在 settings.json 中的colorCustomiztions中尝试这些:

"workbench.colorCustomizations": {

  "minimap.selectionHighlight": "#bbff00",
  "minimap.findMatchHighlight": "#ff0000"
}

Unfortunately, it'll color the whole line with a more transparent version of your chosen color as well as highlight the actual selection or find match with whatever you set above.不幸的是,它会用您选择的颜色的更透明版本为整条线着色,并突出显示实际选择或与您在上面设置的任何内容匹配。

It doesn't look like this a setting for simple occurrence matches, as by single-clicking a word.它看起来不像是一个简单匹配的设置,就像单击一个单词一样。

Definitely reload vscode after making any changes to colorCustomiztions .对 colorCustomiztions 进行任何更改后,一定要重新加载colorCustomiztions I get some funky behaviour if I don't do that.如果我不这样做,我会得到一些时髦的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM