Vim在C中自动完成结构
我正在尝试使用Vim自动完成。我在文件Vim在C中自动完成结构,c,vim,autocomplete,C,Vim,Autocomplete,我正在尝试使用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 /^ty
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
您正在寻找omni complete(
Ctrl-X Ctrl-O
)
Ctrl-p
或Ctrl-N
仅自动完成当前文件/缓冲区中的单词。我相信,您希望在vim 7中引入IntelisSense(R)(全方位)。看-不确定这是否有帮助