diff --git a/README.md b/README.md index b527c59..8ccc8e4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,16 @@ # vim composer Manage [composer](https://getcomposer.org) in Vim + ```vim :ComposerRun ``` +To run command for example `:ComposerRun validate` run command validate for your json + +```vim +:ComposerGet +``` +This command exec the installation flow of composer's install. This process require `curl` + ## Install ```vim diff --git a/plugin/vim-composer.vim b/plugin/vim-composer.vim index 2f69050..29ccfb6 100644 --- a/plugin/vim-composer.vim +++ b/plugin/vim-composer.vim @@ -15,16 +15,20 @@ if !exists("g:composer_cmd") if filereadable('./composer.phar') - let g:composer_cmd='./composer.phar' + let g:composer_cmd='php ./composer.phar' else let g:composer_cmd='composer' endif endif command! -narg=* ComposerRun call s:ComposerRunFunc() +command! ComposerGet call s:ComposerGetFunc() function! s:ComposerRunFunc(arg) let s:arg = a:arg exe "!".g:composer_cmd." ".s:arg endfunction +function! s:ComposerGetFunc() + exe "! curl -Ss https://getcomposer.org/installer | php" +endfunction