让vim识别很酷的语法

让vim识别很酷的语法,vim,vi,Vim,Vi,我在macOS上使用vim 8.1(用于插件管理的vim插件)。我需要处理很酷的文件,所以我手动下载了,并将其放入~/.vim/syntax 我在我的.vimrc中添加了以下行,以便将.cl扩展与COOL关联: au BufNewFile,BufRead *.cl setf cool 但是,当我将.cl文件加载到vim中时,它无法识别该语言 :verbose set ft ? 收益率: filetype=lisp Last set from /usr/local/Cellar/vim/8.

我在macOS上使用vim 8.1(用于插件管理的vim插件)。我需要处理很酷的文件,所以我手动下载了,并将其放入
~/.vim/syntax

我在我的
.vimrc
中添加了以下行,以便将
.cl
扩展与COOL关联:

au BufNewFile,BufRead *.cl setf cool 
但是,当我将
.cl
文件加载到vim中时,它无法识别该语言

:verbose set ft ?
收益率:

filetype=lisp
Last set from /usr/local/Cellar/vim/8.1.0650/share/vim/vim81/filetype.vim line 875
.virmc
行更改为:

au BufNewFile,BufRead *.cool setf cool
使vim将文件识别为酷文件


我应该怎么做才能使
.cl
默认为COOL而不是LISP?

使用以下内容创建文件
~/.vim/filetype.vim

augroup filetypedetect
  au BufNewFile,BufRead *.cl setf cool
augroup END

请参见
:帮助新建文件类型

创建包含以下内容的文件
~/.vim/filetype.vim

augroup filetypedetect
  au BufNewFile,BufRead *.cl setf cool
augroup END
请参见
:帮助新建文件类型