Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2548391
  • 博文数量: 351
  • 博客积分: 76
  • 博客等级: 上将
  • 技术积分: 3555
  • 用 户 组: 普通用户
  • 注册时间: 2004-11-13 21:27
文章分类

全部博文(351)

文章存档

2013年(1)

2012年(4)

2011年(7)

2010年(16)

2009年(34)

2008年(34)

2007年(34)

2006年(68)

2005年(82)

2004年(71)

分类: C/C++

2005-08-22 16:03:52

在阅读代码时,直接寻找某一变量的定义。

struct X x;

void foo()
{
    struct Y y;
    struct Z z;

    ...
}

For some reason you've forgotten what y and z are and want to go to their declaration double quick. One way
of doing this is by searching backwards for y or z. VIM offers a simpler and quicker solution. The
gd keystroke stands for Goto Declaration. With the cursor on "y" if you hit gd the cursor will take you to the
declaration :− struct Y y;.
A similar keystroke is gD. This takes you to the global declaration of the variable under the cursor. So if one
want to go to the declaration of x, then all one needs to do is hit gD and the cursor will move to the
declaration of x.

阅读(2297) | 评论(0) | 转发(0) |
0

上一篇:爱与不爱

下一篇:更上100层楼

给主人留下些什么吧!~~