[vim] match
if expand('%:p:h') =~ 'app\|lib\|src' echo 'class' elseif expand('%:p:h') =~ 'test\|tests' echo 'test' elseif expand('%:p:h') =~ 'spec' echo 'spec' else echo 'non' endif