博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vim与CTAGS查看头文件
阅读量:2343 次
发布时间:2019-05-10

本文共 486 字,大约阅读时间需要 1 分钟。

一.查看函数/变量定义

3.设置vim的tags搜索路径

编辑 ~/.vimrc文件,加上一行

  #add this line to let the ctags search tags in the file "/opt/gtk/tags"

set tags+=/opt/gtk/tags
4.在gtk源码中将光标移动到想要查看的变量或函数上,按下Ctrl - ] 即可以查看其定义.Ctrl - T返回原文件

 二.查看头文件

1.编辑 ~/.vimrc 文件,加上一行:

#add this line to let vim can search the header file in the directory "/opt/gtk/include" and "/opt/gtk/include/glib" ...

set path += /opt/gtk/include/,/opt/gtk/include/*

2.在vim中将光标移动到#include <xxx.h>头文件名中,按esc,gf(助记词:goto file),即可查看头文件.返回用:
:bp
:bf

转载地址:http://lhfvb.baihongyu.com/

你可能感兴趣的文章
mario collision
查看>>
tiled 地图工具
查看>>
小游戏
查看>>
旋转关节绳子
查看>>
射箭box2d
查看>>
cocos2d iphone-wax cocowax
查看>>
angribird level editor
查看>>
love2d 苹果运行
查看>>
GridBagLayout 的注意
查看>>
ajax 跨域iis6 设置
查看>>
4.0版本改动
查看>>
IE8 9 ajax no-transport ajax 问题
查看>>
oracle 启动dbconsole
查看>>
entity-framework 6解决方案中多个项目使用
查看>>
ios基础
查看>>
unity3d
查看>>
metronic 1.5
查看>>
unity3d 4 assert store
查看>>
nstableView 的 注意事项
查看>>
tab bar control 注意事项
查看>>