Skip to content

Commit b27b35e

Browse files
committed
Merge pull request #87 from Tekhne/detect_scripts
Detect `#!` lines using Elixir.
2 parents 16473d4 + 62955ac commit b27b35e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ftdetect/elixir.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
22
au FileType elixir setl sw=2 sts=2 et iskeyword+=!,?
3+
4+
function! s:DetectElixir()
5+
if getline(1) =~ '^#!.*\<elixir\>'
6+
set filetype=elixir
7+
endif
8+
endfunction
9+
10+
autocmd BufNewFile,BufRead * call s:DetectElixir()

0 commit comments

Comments
 (0)