Chinaunix首页 | 论坛 | 博客
  • 博客访问: 278746
  • 博文数量: 91
  • 博客积分: 1772
  • 博客等级: 上尉
  • 技术积分: 930
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-17 19:49
文章分类

全部博文(91)

文章存档

2012年(1)

2011年(36)

2010年(50)

2008年(4)

我的朋友

分类: LINUX

2008-08-10 22:18:00

在window上用过source inside(我还没有用过了),浏览代码的时候会觉得很方便。
然而在linux开发环境中也有相关的软件取代它--ctags
 
简单的脚本:
#!/bin/bash
make clean
find ./ -name "*.h" -o -name "*.c" -o -name "*.cc" >cscope.files
cscope -bkq -i cscope.files
ctags -R
 
这样生成几个cscope&tag文件, 然而如果这样,你只可以在本目录下浏览,不能在其他目录浏览。
解决方法:
1 建立一个文件夹,
2 修改脚本,指定路径
#!/bin/bash
make clean
find ~/linux-kernel/ -name "*.h" -o -name "*.c" -o -name "*.cc" >cscope.files
cscope -bkq -i cscope.files
ctags -R
3 在brash_profile还是在.vimrc中加入这些的库(现在没有开linux,忘了,以后补上)。
 
哈哈 可以用ctrl+】查找你想要的东东了。
 
 
 
 
阅读(1216) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~