Permalink
Browse files

Switch to projectionist

  • Loading branch information...
1 parent b247b96 commit 25d19b1882fd9b1905cea15b6ec442d34b8eb53e @tpope committed May 10, 2014
Showing with 10 additions and 10 deletions.
  1. +1 −1 README.markdown
  2. +2 −2 doc/bundler.txt
  3. +7 −7 plugin/bundler.vim
View
@@ -14,7 +14,7 @@ This is a lightweight bag of Vim goodies for
* Highlight Bundler keywords in `Gemfile`.
* Support for `gf` in `Gemfile.lock`, plus syntax highlighting that
distinguishes between installed and missing gems.
-* Support for [projectile.vim](https://github.com/tpope/vim-projectile),
+* Support for [projectionist.vim](https://github.com/tpope/vim-projectionist),
including projections based on which gems are bundled.
## Installation
View
@@ -43,9 +43,9 @@ COMMANDS *bundler-commands*
:Bpedit[!] [gem] Like |:Bopen|, but use a preview window. Add ! to
suppress the |:lcd|.
-PROJECTILE SUPPORT *bundler-projectile*
+PROJECTIONIST SUPPORT *bundler-projectionist*
-If the Vim plugin |projectile| is installed, bundler.vim will provide
+If the Vim plugin |projectionist| is installed, bundler.vim will provide
alternates and a default dispatch for the Gemfile and lock file. In addition,
projections will be loaded for each bundled gem from two locations:
*g:gem_projections* keyed by gem name, and *lib/projections.json* from the
View
@@ -193,13 +193,13 @@ function! s:Setup(path) abort
endif
endfunction
-function! s:ProjectileDetect() abort
- if s:Detect(g:projectile_file)
- call projectile#append(b:bundler_root, {
+function! s:ProjectionistDetect() abort
+ if s:Detect(get(g:, 'projectionist_file', ''))
+ call projectionist#append(b:bundler_root, {
\ 'Gemfile': {'dispatch': ['bundle', '--gemfile={file}'], 'alternate': 'Gemfile.lock'},
\ 'Gemfile.lock': {'alternate': 'Gemfile'}})
for projections in bundler#project().projections_list()
- call projectile#append(b:bundler_root, projections)
+ call projectionist#append(b:bundler_root, projections)
endfor
endif
endfunction
@@ -211,8 +211,8 @@ augroup bundler
\ if empty(&filetype) |
\ call s:Setup(expand('<afile>:p')) |
\ endif
- autocmd User ProjectileDetect call s:ProjectileDetect()
- autocmd User ProjectileActivate
+ autocmd User ProjectionistDetect call s:ProjectionistDetect()
+ autocmd User ProjectionistActivate
\ if exists('b:bundler_root') && !exists(':Bopen') |
\ silent doautocmd User Bundler |
\ endif
@@ -443,7 +443,7 @@ function! s:project_projections_list() dict abort
endif
for path in self.sorted()
if filereadable(path . '/lib/projections.json')
- call add(list, projectile#json_parse(readfile(path . '/lib/projections.json')))
+ call add(list, projectionist#json_parse(readfile(path . '/lib/projections.json')))
endif
endfor
endif

0 comments on commit 25d19b1

Please sign in to comment.