diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-18 00:37:06 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-18 00:37:06 +1200 |
commit | c2f115fd2fb4eae76782d74584eeea36afebc52b (patch) | |
tree | 8a8835caf525da56a9a20634ebbee87e8fa6f308 | |
parent | Test 'compatible' is off before loading main vimrc (diff) | |
download | dotfiles-c2f115fd2fb4eae76782d74584eeea36afebc52b.tar.gz dotfiles-c2f115fd2fb4eae76782d74584eeea36afebc52b.zip |
Move single ftdetect rule into filetype.vim
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | vim/filetype.vim | 10 | ||||
-rw-r--r-- | vim/ftdetect/perl.vim | 9 |
3 files changed, 10 insertions, 15 deletions
@@ -51,7 +51,6 @@ install-vim-compiler \ install-vim-config \ install-vim-filetype \ - install-vim-ftdetect \ install-vim-ftplugin \ install-vim-gui \ install-vim-gui-config \ @@ -531,7 +530,6 @@ install-vim: install-vim-after \ install-vim-compiler \ install-vim-config \ install-vim-filetype \ - install-vim-ftdetect \ install-vim-ftplugin \ install-vim-indent \ install-vim-plugin \ @@ -599,10 +597,6 @@ install-vim-config: install-vim-cache install-vim-filetype: cp -p -- vim/filetype.vim vim/scripts.vim $(VIMDIR) -install-vim-ftdetect: - mkdir -p -- $(VIMDIR)/ftdetect - cp -p -- vim/ftdetect/*.vim $(VIMDIR)/ftdetect - install-vim-ftplugin: mkdir -p -- $(VIMDIR)/ftplugin cp -p -- vim/ftplugin/*.vim $(VIMDIR)/ftplugin 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 |