0

我想在 Vim 中完成代码。我尝试使用本教程:http ://design.liberta.co.za/articles/code-completion-intellisense-for-cpp-in-vim-with-omnicppcomplete/

我的问题:

这个终端提示应该是在目录中生成一个“标签”文件,但似乎标志不对?

$ ctags -R --c++-kinds=+p --fields=+iaS --extra=+q ./

如果我在终端中使用它,我会得到这个。

usage: ctags [flags] filenames...
    -Dword  Ignore "word" -- handy for parameter macro name
    -F      Use /regexp/ (default)
    -B      Use ?regexp? instead of /regexp/
    -N      Use line numbers instead of /regexp/
    -g      Store static tags as though they were global (implies -h -s)
    -s      Include static tags
    -e      Include extern tags
    -i      Include inline definitions
    -t      Include typedefs
    -v      Include variable declarations
    -h      Add hints to help elvis distinguish between overloaded tags
    -l      Add a "ln" line number hint (implies -h)
    -p      Write parse info to stdout (for debugging ctags)
    -d      Warn about duplicates, on stdout
    -x      Write cross-reference table to stdout; skip "tags"
    -r      Write a "refs" file, in addition to "tags"
    -a      Append to "tags", instead of overwriting
If no flags are given, ctags assumes it should use -l -i -s -t -v
Report bugs to kirkenda@cs.pdx.edu

我做某事吗?错误的?这已经是我阅读的第二个教程了,我总是在这一步上失败。

此致

4

1 回答 1

2

看起来你没有旺盛的 ctags。你应该安装它。

ctags --help输出应以以下内容开头

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: May 22 2012, 13:52:32
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex
于 2013-08-01T17:58:42.823 回答