Skip to content

Commit 67b3e9f

Browse files
author
Gianluca Arbezzano
committed
Merge pull request #1 from vim-php/feature/get-composer
Download composer.phar in root dir
2 parents 83a5869 + c4e3677 commit 67b3e9f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# vim composer
22
Manage [composer](https://getcomposer.org) in Vim
3+
34
```vim
45
:ComposerRun <args>
56
```
7+
To run command for example `:ComposerRun validate` run command validate for your json
8+
9+
```vim
10+
:ComposerGet
11+
```
12+
This command exec the installation flow of composer's install. This process require `curl`
13+
614

715
## Install
816
```vim

plugin/vim-composer.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@
1515

1616
if !exists("g:composer_cmd")
1717
if filereadable('./composer.phar')
18-
let g:composer_cmd='./composer.phar'
18+
let g:composer_cmd='php ./composer.phar'
1919
else
2020
let g:composer_cmd='composer'
2121
endif
2222
endif
2323

2424
command! -narg=* ComposerRun call s:ComposerRunFunc(<q-args>)
25+
command! ComposerGet call s:ComposerGetFunc()
2526

2627
function! s:ComposerRunFunc(arg)
2728
let s:arg = a:arg
2829
exe "!".g:composer_cmd." ".s:arg
2930
endfunction
3031

32+
function! s:ComposerGetFunc()
33+
exe "! curl -Ss https://getcomposer.org/installer | php"
34+
endfunction

0 commit comments

Comments
 (0)