Commits

Shrikant Sharat Kandula committed 85a5ee3

Read vimrc file instead of bundles.vim

Comments (0)

Files changed (2)

 This is a script that manages plugins hosted on git or hg and make them available
 to pathogen, so it make your vim ever the more awesome!
 
-First off, create a `bundles.vim` file in your dotvim directory and put lines like
-the following:
+First off, this script assumes you have a file called `vimrc` in your dotvim directory,
+which might as well be linked to your `~/.vimrc` file. In that file, put lines like
+the following, (one for each plugin you want):
 
 	" Bundle: git://github.com/tpope/vim-pathogen.git
 
 Note: You'll anyway need the above line at least, you of course need pathogen, silly.
+Note: You can get github links from http://vim-scripts.org for plugins that don't offer
+sane deployment options.
 
 Add any number such bundle lines with various plugins. Vimpire will try to guess the
 vcs from git or hg, and is correct most of the time, but if you want to specify it
 
 There, that `with git` in the end is what tells Vimpire what vcs to use. Neat eh?
 
-Navigate to your vimfiles or dotvim directory and do
+You can also decide what folder the plugin will be cloned to, by using the `to` option
+in a similar way to the `with` option as described above. For example,
+
+    " Bundle: git://github.com/tpope/vim-pathogen.git to super-plugin
+
+And this will cause the pathogen plugin to be cloned to `bundle/super-plugin` instead of
+`bundle/vim-pathogen`.
+
+And of course, you can have a line with both the `with` and the `to` options, along with
+any other that might be added in the future ;).
+
+Now, navigate to your vimfiles or dotvim directory and do
 
 	$ wget http://bitbucket.org/sharat87/vimpire/raw/428f69cf2d16/vimpire.py
 	$ python vimpire.py
 if vimfiles_dir:
     os.chdir(vimfiles_dir)
 
-bundles_file = 'bundles.vim'
+bundles_file = 'vimrc'
 bundle_dir = 'bundle'
 
 with open(bundles_file) as f:
 
     plugin_dirs = []
     bundles = []
+    in_bundle_context = False
 
     for line in bundles_file_lines:
         m = re.match(r'^\s*"\s*(\w+)(!?):(!?)\s*(.*)$', line, re.I)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.