diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-11-03 21:14:31 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-11-03 21:14:31 +0100 |
commit | d5d015d4570eabc9a2da620cce906617e72ac625 (patch) | |
tree | c6b0ad205f8155241b2d0e38918258fe1237eaeb /runtime/filetype.vim | |
parent | 18e5469b6e73dfbd85ac9831224cd4ec29cbe308 (diff) | |
download | vim-d5d015d4570eabc9a2da620cce906617e72ac625.zip |
Update runtime files.
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r-- | runtime/filetype.vim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 26629bdb7..f5ece1728 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: 2013 Sep 22 +" Last Change: 2013 Oct 06 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -2061,14 +2061,15 @@ au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers " SVG (Scalable Vector Graphics) au BufNewFile,BufRead *.svg setf svg -" If the file has an extension of 't' and is in a directory 't' then it is -" almost certainly a Perl test file. +" If the file has an extension of 't' and is in a directory 't' or 'xt' then +" it is almost certainly a Perl test file. " If the first line starts with '#' and contains 'perl' it's probably a Perl " file. " (Slow test) If a file contains a 'use' statement then it is almost certainly " a Perl file. func! s:FTperl() - if expand("%:e") == 't' && expand("%:p:h:t") == 't' + let dirname = expand("%:p:h:t") + if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt') setf perl return 1 endif |