Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经浏览了所有 YouCompleteMe 的文档(针对 vim),但我似乎找不到设置它识别为 C++ 文件的文件扩展名的选项。我正在尝试更改它,以便在 .h 文件中具有 C++ 语义完成。有任何想法吗?
没关系,使用 vim 的内置设置通过将以下行添加到我的 .vimrc 来强制 vim 将 .h 文件检测为 cpp
au BufRead,BufNewFile *.h set filetype=cpp
似乎 YCM 现在对 .h 文件使用 cpp 完成 :)