简体   繁体   English

突出显示 Visual Studio Code 中的函数,如 NetBeans

[英]Highlight functions in Visual Studio Code like NetBeans

What I need to have is demonstrated in the following two screen shots, where first one from NetBeans IDE 8.2 and the second from VSCode 1.17.2.以下两个屏幕截图展示了我需要的内容,其中第一个来自 NetBeans IDE 8.2,第二个来自 VSCode 1.17.2。

在此处输入图片说明

在此处输入图片说明

I typically wants to have the white highlight, on the left , line appears in the NetBeans IDE to be found, or something like it, in VSCode.我通常希望在 VSCode 中在 NetBeans IDE 中找到左侧的白色突出显示行或类似的行。

I have tried the following setting:我尝试了以下设置:

"editor.showFoldingControls": "always",

I also tried to search for any plugins about folding and code highlight but I could not able to determine which one is suitable to perform this visual effect on code highlighting.我还尝试搜索有关折叠和代码突出显示的任何插件,但我无法确定哪一个适合在代码突出显示上执行这种视觉效果。

There is no visual indicator in the gutter portion of the editor in VSCode. VSCode 编辑器的装订线部分没有视觉指示器。
That was requested in Microsoft/vscode issue 25132 or issue 19690 , closed in favor of issue 60670 and PR 77363 : "Add folding from end of region", which was never merged.这是在Microsoft/vscode问题 25132问题 19690中提出的要求,以支持问题 60670PR 77363关闭:“从区域末尾添加折叠”,从未合并。

For now, VSCode 1.42 (Q1 2020) proposes " Folded region highlighting "目前,VSCode 1.42 (Q1 2020) 提出“ 折叠区域高亮

Folded code regions are now easier to discover with the addition of a background highlight.通过添加背景突出显示,折叠的代码区域现在更容易被发现。

The feature is controlled by the setting editor.foldingHighlight and the color can be customized with the color editor.foldBackground .该功能由设置editor.foldingHighlight控制,可以使用 color editor.foldBackground自定义颜色。

"workbench.colorCustomizations": {
  "editor.foldBackground": "#355000"
}

That means those functions (which are foldable) are easier to spot.这意味着那些功能(可折叠)更容易被发现。

From there:从那里:

  • Shift + Click once on the folding indicator to first fold the inner ranges. Shift + 在折叠指示器上单击一次以首先折叠内部范围。
  • Shift + Click again (when all inner ranges are already folded) will fold the parent. Shift + 再次单击(当所有内部范围都已折叠时)将折叠父级。
  • Shift + Click again unfolds all. Shift +单击再次展开所有。

使用 shift + 单击折叠 -- https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/images/1_42/folding-shift-click.gif

有用 --> Ctrl + Shift + \\ 跳转到匹配的括号

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

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