Skip to content
This repository was archived by the owner on May 1, 2022. It is now read-only.

Commit 23d5517

Browse files
authored
Merge pull request #43 from fredemmott/executables
Recognize executables that dont' have the extension
2 parents 03e6eb9 + 67c4e79 commit 23d5517

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ftdetect/hack.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ au BufRead,BufNewFile *.hh,*.php
2020
\ setl filetype=hack |
2121
\ setl syntax=php |
2222
\ endif
23+
24+
" Try to match both `/usr/bin/hhvm`, and `/usr/bin/env hhvm`.
25+
au BufRead,BufNewFile *
26+
\ if getline(1) =~ '[ /]hhvm$' && getline(2) =~ '^<?hh' |
27+
\ setl filetype=hack |
28+
\ setl syntax=php |
29+
\ endif

0 commit comments

Comments
 (0)