1
1
Fork 0

Partially import github.com/keith/swift.vim

This commit is contained in:
Jonathan Schleifer 2020-02-27 20:57:56 +00:00
parent f8edb175fa
commit 1c0cd8a576
4 changed files with 615 additions and 0 deletions

12
vim/ftdetect/swift.vim Normal file
View file

@ -0,0 +1,12 @@
autocmd BufNewFile,BufRead *.swift set filetype=swift
autocmd BufRead * call s:Swift()
function! s:Swift()
if !empty(&filetype)
return
endif
let line = getline(1)
if line =~ "^#!.*swift"
setfiletype swift
endif
endfunction