How to hide reference counts in VS2013?

前端 未结 5 1765
不思量自难忘°
不思量自难忘° 2020-11-28 00:31

Visual Studio 2013 introduced a new feature where it shows you how many times each of your methods are used.

\"\"

相关标签:
5条回答
  • 2020-11-28 00:47

    Workaround....

    In VS 2015 Professional (and probably other versions). Go to Tools / Options / Environment / Fonts and Colours. In the "Show Settings For" drop-down, select "CodeLens" Choose the smallest font you can find e.g. Calibri 6. Change the foreground colour to your editor foreground colour (say "White") Click OK.

    0 讨论(0)
  • 2020-11-28 00:59

    I guess you probably are running the preview of VS2013 Ultimate, because it is not present in my professional preview. But looking online I found that the feature is called Code Information Indicators or CodeLens, and can be located under

    Tools → Options → Text Editor → All Languages → CodeLens

    (for RC/final version)

    or

    Tools → Options → Text Editor → All Languages → Code Information Indicators

    (for preview version)

    That was according to this link. It seems to be pretty well hidden.

    In Visual Studio 2013 RTM, you can also get to the CodeLens options by right clicking the indicators themselves in the editor:

    editor options

    documented in the Q&A section of the msdn CodeLens documentation

    0 讨论(0)
  • 2020-11-28 00:59

    In VSCode for Mac (0.10.6) I opened "Preferences -> User Settings" and placed the following code in the settings.json file

    "editor.referenceInfos": false
    

    User and Workspace Settings

    0 讨论(0)
  • 2020-11-28 01:04

    The other features of CodeLens like: Show Bugs, Show Test Status, etc (other than Show Reference) might be useful.

    However, if the only way to disable Show References is to disable CodeLens altogether.

    Then, I guess I could do just that.

    Furthermore, I would do like I always have, 'right-click on a member and choose Find all References or Ctrl+K, R'

    If I wanted to know what references the member -- I too like not having any extra information crammed into my code, like extra white-space.

    In short, uncheck Codelens...

    0 讨论(0)
  • 2020-11-28 01:05

    Another option is to use mouse, right click on "x reference". Context menu "CodeLens Options" will appear, saving all the navigation headache.

    0 讨论(0)
提交回复
热议问题