sunaku/vim-unbundle — Issue #5: Pass filetype array to Unftbundle
Author: eligundry
Created: 2012-01-23 00:10:13+00:00
State: open

Hi there, I'm really loving the speed improvements Unbundle is doing for my Vim install. I have but one issue, and that's passing multiple filetypes to Unftbundle. For example, when I'm working with PHP files, I want to have my HTML, CSS, and Javascript bundles loaded. I do this with an augroup block, like so:

```vim
augroup ft_php
au!
call Unftbundle('html')
call Unftbundle('css')
call Unftbundle('javascript')
augroup END
```

I think we can all agree that this could be a much nicer process if Unftbundle accepted an array, which would make my example:

```vim
augroup ft_php
au!
call Unftbundle(['html', 'css', 'javascript'])
augroup END
```

Here are my suggestions:

1. Simply allow Unftbundle to accept an array of filetypes
2. Provide a seperate function in Unbundle that allows for an associative array that calls these autocmd's automatically (example below)

```vim
let g:unftbundle_map = { 'php': ['html', 'css', 'javascript'],
\ 'eruby': ['ruby', 'haml', 'scss', 'html', 'css'],
\ 'html': ['css', 'javascript'] }
```