我正在尝试使用Vim自动完成功能.我有一个struct档案def.h:
typedef struct test{
int x;
int y;
}*test_p,test_t;
Run Code Online (Sandbox Code Playgroud)
并在相应的C文件中:
test_p t;
t->[autocomplete here]
Run Code Online (Sandbox Code Playgroud)
我应该用什么来填充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
Run Code Online (Sandbox Code Playgroud)