2016-01-29 52 views
14

突出我经由打字稿语法在vim

git clone https://github.com/leafgarland/typescript-vim.git ~/.vim/bundle/typescript-vim 

安装typescript plugin并插入

au BufRead,BufNewFile *.ts setfiletype typescript 

通过~/.vim.rc成。通过Syntastic和TSC掉毛/ tslint运作良好,并

:set syntax 

显示syntax=typescript。但是,

:syntax 

显示No Syntax items defined for this buffer并突出显示不起作用。

任何想法发生了什么问题?

+0

我安装了[Pathogen](https://github.com/tpope/vim-pathogen),'〜/ .vimrc'中的'au ...'指令就是我所需要的。 – bloodyKnuckles

回答

14

从什么是~/.vimrc缺少的是在哪里可以找到插件的规范,即

Plugin 'leafgarland/typescript-vim' 

高亮现在的作品。

+0

确保你已经安装了Vundle第一个 https://github.com/VundleVim/Vundle.vim –