diff --git a/README.md b/README.md index 3207966..035c619 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ let g:composer_install_callback = "MyCallbackFunction" ``` In this example after every `composer install` I exec a ctags generation +```vim +:ComposerUpdate [--no-dev ..] +``` +This command exec `composer update`. + ```vim :ComposerJSON ``` diff --git a/plugin/vim-composer.vim b/plugin/vim-composer.vim index 6d0b9d0..f3608fc 100644 --- a/plugin/vim-composer.vim +++ b/plugin/vim-composer.vim @@ -24,6 +24,7 @@ endif command! -narg=* ComposerRun call s:ComposerRunFunc() command! -narg=* ComposerInstall call s:ComposerInstallFunc() +command! -narg=* ComposerUpdate call s:ComposerUpdateFunc() command! ComposerGet call s:ComposerGetFunc() command! ComposerJSON call s:OpenComposerJSON() @@ -55,6 +56,10 @@ function! s:ComposerInstallFunc(arg) endif endfunction +function! s:ComposerUpdateFunc(arg) + exe s:ComposerRunFunc("update") +endfunction + function! g:ComposerKnowWhereCurrentFileIs() let g:currentWord = expand('') let l:command = "grep " . g:currentWord . " ./vendor/composer -R | awk '{print $6}' | awk -F\\' '{print $2}'"