Visual Studio Code Definition Window

<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

长时间使用Eclipse,让我对Eclipse的好感日渐增加,甚至已经超越曾经对Visual Stuido 2005的好感。现在又再次使用Visual Studio 2008,发现还是有不少地方不太习惯,其中最明显的是快捷键。觉得Eclipse的快捷键更加合理,可能是使用的时间长了。而VS的快捷键怎么总是那么复杂——很多需要两次按键,譬如Ctrl+R, M。可能是VS的快捷键太多了,所以用这种方法来避免重复吧。还有一个明显的感觉不适应就是Eclipse有一个Declaration View,选中Editor中的一个方法名就可以看到相应的定义,对于看代码来说这个功能还是相当好的。在VS里面也有个类似的View:Code Definition View。不过开始怎么试用都不行。后来发现,VS不是选中方法名,而是 用鼠标点击一下方法名。具体的介绍从网上找到一篇文章:

Not enough people know about the code definition window in Visual Studio 2005. I see them trying to understand code by getting editor tips on the classes and functions they see in use:

A reasonably clever trick is to use Ctrl+Shift+Space to get parameter tips for the function:

But the tips are transient, they go away when you use your mouse and try to do some work. So most people fall back on good old Go To Definition:

Sure, this isn't transient, but it leaves you sitting in another file and needing to flip back and forth from file to file when you're just trying to understand what a particular function call does. What I like to use in this case is the code definition window. It's on the view menu:

And here's what it gives you:

It also works to show you the code for a function you're calling. Once it's open, just click on the thing you want to see in the code definition window:

Once you get in the habit of just glancing down to the bottom of the screen to get a little more information, you'll wonder how you ever did without it.

Kate


<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值