• 请不要在回答技术问题时复制粘贴 AI 生成的内容
reaCodes
V2EX  ›  程序员

Visual Studio 中有没有类似 Visual Studio Code 中的 GitLens 插件?

  •  
  •   reaCodes ·
    zhatlas · Feb 10, 2020 · 5387 views
    This topic created in 2310 days ago, the information mentioned may be changed or developed.
    或者是 Git History,可以显示,代码每一行的提交信息,修改人等
    13 replies    2021-07-05 11:17:54 +08:00
    jinliming2
        1
    jinliming2  
       Feb 10, 2020 via iPhone
    插件不知道,但是命令行可以直接 git blame
    dhssingle
        2
    dhssingle  
       Feb 11, 2020 via iPhone
    这是 VS 自带的功能,叫 CodeLens。
    Rwing
        3
    Rwing  
       Feb 11, 2020
    CodeLens
    NicholasYX
        4
    NicholasYX  
       Feb 11, 2020
    这个不是自带的吗?默认就会显示
    Nasei
        5
    Nasei  
       Feb 11, 2020
    这个都不用开 CodeLens,源码文件右键就有 Blame
    reaCodes
        6
    reaCodes  
    OP
       Feb 11, 2020
    @dhssingle 我在 Visual Studio 2019 的设置中已经打开了 Codelens,但是界面上还是不能起作用,不知道为什么
    reaCodes
        7
    reaCodes  
    OP
       Feb 11, 2020
    @Rwing 我在 Visual Studio 2019 的设置中已经打开了 Codelens,但是界面上还是不能起作用,不知道为什么
    smilenceX
        8
    smilenceX  
       Feb 11, 2020
    community 版本是不显示的。
    reaCodes
        9
    reaCodes  
    OP
       Feb 11, 2020
    @smilenceX 我看网上不是说 2019 社区版也支持 codelens 了吗,况且设置里边也有
    smilenceX
        10
    smilenceX  
       Feb 11, 2020
    @reaCodes 没太关注网上的消息,我现在用的是 2019 社区版,已经更新到最新,也没有显示每行代码的提交信息,虽然选项里有 codelens 的设置,但并没有看到 git 相关的东西
    Rwing
        12
    Rwing  
       Feb 11, 2020
    不会显示在每行后面,而是在方法的前面
    guoleilam
        13
    guoleilam  
       Jul 5, 2021
    根据 Rwing 分享的链接,显示引用限于 c#和 Visual Basic ;
    另据 https://github.com/MicrosoftDocs/visualstudio-docs.zh-cn/blob/live/docs/ide/find-code-changes-and-other-history-with-codelens.md 显示:CodeLens 出现在方法、类、索引器和属性级别的 C# 和 Visual Basic 代码中。 对于所有其他文件类型,CodeLens 出现在文件级别。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5762 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 96ms · UTC 06:34 · PVG 14:34 · LAX 23:34 · JFK 02:34
    ♥ Do have faith in what you're doing.