summaryrefslogtreecommitdiffstats
path: root/vim/ftplugin/perl.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/ftplugin/perl.vim')
-rw-r--r--vim/ftplugin/perl.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim
index 085e940..156ccff 100644
--- a/vim/ftplugin/perl.vim
+++ b/vim/ftplugin/perl.vim
@@ -10,3 +10,17 @@ function! s:perldoc(word)
endfunction
nnoremap <buffer> <silent>K :call Help(0, [':'], '<SID>perldoc')<CR>
vnoremap <buffer> <silent>K :call Help(1, [':'], '<SID>perldoc')<CR>
+
+function! s:set_excludes()
+ if filereadable("dist.ini")
+ for line in readfile("dist.ini", '', 10)
+ let name = matchstr(line, '\s*name\s*=\s*\zs.*')
+ if name != ""
+ exe 'set wildignore+=' . name . '-*/*'
+ break
+ endif
+ endfor
+ endif
+endfunction
+autocmd BufReadPost * call <SID>set_excludes()
+call <SID>set_excludes()