【发布时间】:2012-07-17 05:35:15
【问题描述】:
我正在尝试使用 Vim 自动完成功能。我在文件def.h 中有一个struct:
typedef struct test{
int x;
int y;
}*test_p,test_t;
并在对应的C文件中:
test_p t;
t->[autocomplete here]
我应该按什么来填充 x 或 y? CTRLP 和 CTRLN 都没有给我来自test 内部的变量。
我已经使用了ctags,当然我也加入了def.h。这是我的标签文件中的内容:
test def.h /^typedef struct test{$/;" s
test_p def.h /^}*test_p,test_t;$/;" t typeref:struct:test
test_t def.h /^}*test_p,test_t;$/;" t typeref:struct:test
x def.h /^ int x;$/;" m struct:test
y def.h /^ int y;$/;" m struct:test
【问题讨论】:
标签: c vim autocomplete