Eclipse's Ctrl+click in Visual Studio?

后端 未结 13 2167
伪装坚强ぢ
伪装坚强ぢ 2021-01-30 09:40

After working for a few days with Eclipse Java I totally got addicted to pressing Ctrl and clicking on an identifier to go to its definition. Since then I\'ve been lo

相关标签:
13条回答
  • 2021-01-30 10:19

    I use the built in options (F12, Right-click -> Go to definition) but I know a lot of the guys at my company use Resharper and it definitely has this functionality.

    0 讨论(0)
  • 2021-01-30 10:23

    If you use Visual Studio 2010, you can use the free Visual Studio 2010 Productivity Power Tools from Microsoft to achieve this.

    0 讨论(0)
  • 2021-01-30 10:23

    oh man, just install resharper!! (vs plugin) with it installed you just go and Ctrl + click to go to definition.

    this is not the only thing resharper does, try it out free!!!

    0 讨论(0)
  • 2021-01-30 10:27

    All in all, both VS and Eclipse have weird key shortcuts. I just had to respond, too: F12 is far too right on the keyboard and you have to leave the the mouse right hand for the keyboard to use it. As a long time VS user I just didn't find it until I searched for the Ctrl+Mouse equivalent in Eclipse. It's completely borked. OK? No need to argue. (The same goes for F3 in Eclipse going for definition. ???? Why the face??? It's FIND NEXT for Pete's sake. But this can be removed after mastering the Eclipse keyboard shortcut system in the course of a few years.)

    Anyway, as has been said here before, Microsoft has already understood this can be an issue for new programmers coming in from Eclipse, so they provided the Power Tools (I followed the link up above).

    http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/

    0 讨论(0)
  • 2021-01-30 10:29

    I'll answer the commentors who asked about the difference between Ctrl-click and F12.

    Ctrl-click workflow:

    • Move hand to mouse
    • Move mouse to hover over variable name
    • Other hand holds down Ctrl key while you click
    • Move mouse to position cursor, highlight, right-click, or whatever
    • Move hand back to keyboard to continue typing

    F12 workflow

    • Move hand to mouse
    • Mouse mouse to hover over variable name
    • Move hand back to keyboard
    • Hit F12 key
    • Move hand back to mouse
    • Move mouse to position cursor, highlight, right-click, or whatever
    • Move hand back to keyboard to continue typing

    If you assume the cursor is already positioned on the desired variable, F12 is better. However, that's rarely the case. Also, if you stop after this specific action, assuming you want hands back at the keyboard, the cost is the same. But if you keep in mind that you probably had a reason for wanting to go to the definition, the Ctrl-click workflow saves you an instance of moving between the keyboard and mouse.

    0 讨论(0)
  • 2021-01-30 10:31

    Visual Assist supports Ctrl+Click as of June 2009 (build 1727). Activate Ctrl+LeftClick in VA Options | Advanced | General. (See the comment below.)

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