aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-18 00:37:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-18 00:37:06 +1200
commitc2f115fd2fb4eae76782d74584eeea36afebc52b (patch)
tree8a8835caf525da56a9a20634ebbee87e8fa6f308 /vim
parentTest 'compatible' is off before loading main vimrc (diff)
downloaddotfiles-c2f115fd2fb4eae76782d74584eeea36afebc52b.tar.gz
dotfiles-c2f115fd2fb4eae76782d74584eeea36afebc52b.zip
Move single ftdetect rule into filetype.vim
Diffstat (limited to 'vim')
-rw-r--r--vim/filetype.vim10
-rw-r--r--vim/ftdetect/perl.vim9
2 files changed, 10 insertions, 9 deletions
diff --git a/vim/filetype.vim b/vim/filetype.vim
index d7ca5255..9d6c6eb7 100644
--- a/vim/filetype.vim
+++ b/vim/filetype.vim
@@ -462,6 +462,16 @@ augroup filetypedetect
\,zshrc
\ setfiletype zsh
+ " If it's a new file in a bin, libexec, or scripts subdir that has a
+ " Makefile.PL sibling, and I'm editing it, it's almost definitely Perl.
+ autocmd BufNewFile
+ \ ?*/bin/?*
+ \,?*/libexec/?*
+ \,?*/scripts/?*
+ \ if filereadable(expand('<afile>:p:h:h') . '/Makefile.PL')
+ \| setfiletype perl
+ \|endif
+
" Load any extra rules in ftdetect directories
runtime! ftdetect/*.vim
diff --git a/vim/ftdetect/perl.vim b/vim/ftdetect/perl.vim
deleted file mode 100644
index 887a9fb6..00000000
--- a/vim/ftdetect/perl.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-" If it's a new file in a bin, libexec, or scripts subdir that has a
-" Makefile.PL sibling, and I'm editing it, it's almost definitely Perl.
-autocmd filetypedetect BufNewFile
- \ ?*/bin/?*
- \,?*/libexec/?*
- \,?*/scripts/?*
- \ if filereadable(expand('<afile>:p:h:h') . '/Makefile.PL')
- \| setfiletype perl
- \|endif