Vim YouCompleteMe 启用 .tex 文件类型 [英] Vim YouCompleteMe enable .tex filetype

查看:54
本文介绍了Vim YouCompleteMe 启用 .tex 文件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我用 Vim 打开一个 *.tex 文件时,文件类型被 YCM 读取为纯文本(由 set ft? 返回).所以我添加了 .vimrc :

When I open a *.tex file with Vim, filetypes is read as plaintex (returned by set ft?) by YCM. So I added in .vimrc :

let g:ycm_filetype_blacklist = {'plaintex' : 1}

但一切都没有改变.

在这里我希望文件类型 .tex 被读取为 tex 类型(set ft=tex).如何使用 YCM 选项定义它?

Here I want that filetype .tex is read as tex type (set ft=tex). How to define it with YCM options?

推荐答案

经过研究(来自 vim-latex 插件)我发现我必须添加以下内容:

After research (from vim-latex plugin) I found that I have to add following:

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'

这篇关于Vim YouCompleteMe 启用 .tex 文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆