Reputation: 22478
I have a file that's being recognized as jasmine.coffee
in VIM,
but &filetype=='coffee'
evaluates to false.
Is there a way to do a partial filetype match in Vimscript
Upvotes: 1
Views: 226
Reputation: 270607
Use the =~
pattern matching operator instead, which will treat the right side as a regular expression to test against.
&filetype =~ 'coffee'
This is mentioned in the Conditionals section of the Vimscript documentation.
Upvotes: 2