加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

Vim,C,YCM和Syntastic包括路径问题

发布时间:2020-12-16 01:32:06 所属栏目:安全 来源:网络整理
导读:我觉得我有一个令人敬畏的设置C编程使用Vim,但我找不到一种方式来告诉Vim,YCM和Syntastic在哪里搜索标题.在Makefile中存在这种信息时,每当我想要处理项目时,都必须手动设置Vim,YCM和Syntastic的包含路径变量.是否有任何自动化解决方案来设置全局包含路径?
我觉得我有一个令人敬畏的设置C编程使用Vim,但我找不到一种方式来告诉Vim,YCM和Syntastic在哪里搜索标题.在Makefile中存在这种信息时,每当我想要处理项目时,都必须手动设置Vim,YCM和Syntastic的包含路径变量.是否有任何自动化解决方案来设置全局包含路径?

编辑:如果我设置这样的路径“:set path =”,/usr/include,include,.. / include,/ home / steven / ovgl / include,“”

您的标题应显示在您的标签文件中(如果您不知道,请参阅 :h tags).

然后,YouCompleteMe可以从标签文件中读取有关标题的信息,如plugin faq中所述:

YCM does not read identifiers from my tags files

First,put let g:ycm_collect_identifiers_from_tags_files = 1 in your vimrc.

Make sure you are using Exuberant Ctags to produce your tags files since
the only supported tag format is the Exuberant Ctags format. The format
from “plain” ctags is NOT supported. The output of ctags –version should
list “Exuberant Ctags”.

Ctags needs to be called with the --fields=+l (that’s a lowercase L,not a
one) option because YCM needs the language:<lang> field in the tags
output.

NOTE: Mac OS X comes with “plain” ctags installed by default. brew install
ctags will get you the Exuberant Ctags version.

Also make sure that your Vim tags option is set correctly. See :h 'tags'
for details. If you want to see which tag files YCM will read for a given
buffer,run :echo tagfiles() with the relevant buffer active. Note that that function will only list tag files that already exist.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读