Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个文件jasmine.coffee在 VIM 中被识别,但&filetype=='coffee'评估为假。
jasmine.coffee
&filetype=='coffee'
有没有办法在 Vimscript 中进行部分文件类型匹配
请改用=~模式匹配运算符,它将右侧视为要测试的正则表达式。
=~
&filetype =~ 'coffee'
Vimscript 文档的条件部分中提到了这一点。