我通过typescript插件进行了安装。
git clone https://github.com/leafgarland/typescript-vim.git ~/.vim/bundle/typescript-vim
并插入
au BufRead,BufNewFile *.ts setfiletype typescript
可以通过 ~/.vim.rc
文件进行配置。使用Syntastic 和 tsc/tslint进行代码检查非常有效。
:set syntax
展示syntax=typescript
的语法。然而,
:syntax
显示 此缓冲区未定义任何语法项
,高亮功能不起作用。
您有什么想法是出了什么问题吗?
~/.vimrc
中的au ...
指令就是我所需要的。 - bloodyKnucklesgit clone https://github.com/leafgarland/typescript-vim.git ~/.vim/pack/typescript/start/typescript-vim
就可以让它正常工作。 - DAEMonRaco