bronson / vim-update-bundles

Use Pathogen and Git to manage your Vim plugins.
91 stars 13 forks source link

use Bundle 'plugin', not # Bundle: plugin #28

Open bronson opened 13 years ago

bronson commented 13 years ago

Only support this style of directive:

Bundle 'jQuery'                                  # https://github.com/vim-scripts/jQuery
Bundle 'scrooloose/nerdtree'                     # https://github.com/scrooloose/nerdtree
Bundle 'git://git.wincent.com/command-t.git'     # Full URL to the repo to clone

Don't allow putting them in comments anymore like this:

" Bundle: jQuery                                  # https://github.com/vim-scripts/jQuery
" Bundle: scrooloose/nerdtree                     # https://github.com/scrooloose/nerdtree
" Bundle: git://git.wincent.com/command-t.git     # Full URL to the repo to clone

Supporting both is too confusing.

bronson commented 12 years ago

Also make sure that trailing comments (either " or #) don't screw it up.

sukima commented 12 years ago

So I understand two formats is confusing but I'm trying to understand why the non commented version is better. I realize it's the syntax for some other plugin but what if you never use this other plugin? Do you have to place some hack in your vimrc to prevent a syntax error on the word "Bundle"? I think having this in a comment is more appropriate.

Have you considered using the Bundle '*' approach with an optional comment? This would allow only one regex and one syntax but allow those who don't use the hack to just comment the line with '"'

" Bundle 'foo' #bar
Bundle 'foo' #bar
match /Bundle\s+'\(.*\)'/i  <-- Works with *both* forms and needs only _one_ parsing algorythm.