为什么 VIM 没有检测到我的咖啡脚本文件类型? [英] Why is VIM not detecting my coffescript filetype?

查看:21
本文介绍了为什么 VIM 没有检测到我的咖啡脚本文件类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 vim-coffee-script 插件 https://github.com/kchmck/vim-咖啡脚本 但它没有将测试文件检测为咖啡脚本文件类型.但是,当我手动操作时

I'm trying to use the vim-coffee-script plugin https://github.com/kchmck/vim-coffee-script but its not detecting a test file as a coffeescript filetype. However when I do it manually

:set ft=coffee

它有效.怎么回事?

.vimrc 和 test.coffee https://gist.github.com/911087

.vimrc and test.coffee https://gist.github.com/911087

推荐答案

我想通了..我不得不通过设置强制重新加载文件类型

I figured it out.. I had to force reloading of the filetype by setting

filetype off
filetype on

具体来说,我必须在运行后执行此操作

Specifically, I had to do this AFTER running

syntax on

这主要在病原体自述文件中进行了解释

This is mostly explained in the pathogen readme

http://www.vim.org/scripts/script.php?script_id=2332

这篇关于为什么 VIM 没有检测到我的咖啡脚本文件类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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