Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vim在C中自动完成结构_C_Vim_Autocomplete - Fatal编程技术网

Vim在C中自动完成结构

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

我正在尝试使用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

您正在寻找omni complete(
Ctrl-X Ctrl-O

Ctrl-p
Ctrl-N
仅自动完成当前文件/缓冲区中的单词。我相信,您希望在vim 7中引入IntelisSense(R)(全方位)。看-不确定这是否有帮助