diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-12-14 21:17:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-12-14 21:17:39 +0100 |
commit | f1568eca24d30d4f308e987657c53cd48d97d8fa (patch) | |
tree | 900c802d8096eca43c957c0b3c16cc36cec32e7b /runtime/filetype.vim | |
parent | f788a0610309ed9787b4e48216c7d7d4446744c5 (diff) |
Update runtime files.
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r-- | runtime/filetype.vim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 983810ca0f..90ce86dd3e 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2011 Oct 08 +" Last Change: 2011 Oct 26 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -566,7 +566,10 @@ au BufNewFile,BufRead *.d call s:DtraceCheck() func! s:DtraceCheck() let lines = getline(1, min([line("$"), 100])) - if match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1 + if match(lines, '^module\>\|^import\>') > -1 + " D files often start with a module and/or import statement. + setf d + elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1 setf dtrace else setf d |