Skip to content

Commit 97fc996

Browse files
author
Gianluca Arbezzano
committed
Merge pull request #18 from sensorario/master
Added missing ComposerUpdate function
2 parents 5976c5a + 47e2e49 commit 97fc996

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ let g:composer_install_callback = "MyCallbackFunction"
2323
```
2424
In this example after every `composer install` I exec a ctags generation
2525

26+
```vim
27+
:ComposerUpdate [--no-dev ..]
28+
```
29+
This command exec `composer update`.
30+
2631
```vim
2732
:ComposerJSON
2833
```

plugin/vim-composer.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ endif
2424

2525
command! -narg=* ComposerRun call s:ComposerRunFunc(<q-args>)
2626
command! -narg=* ComposerInstall call s:ComposerInstallFunc(<q-args>)
27+
command! -narg=* ComposerUpdate call s:ComposerUpdateFunc(<q-args>)
2728
command! ComposerGet call s:ComposerGetFunc()
2829
command! ComposerJSON call s:OpenComposerJSON()
2930

@@ -55,6 +56,10 @@ function! s:ComposerInstallFunc(arg)
5556
endif
5657
endfunction
5758

59+
function! s:ComposerUpdateFunc(arg)
60+
exe s:ComposerRunFunc("update")
61+
endfunction
62+
5863
function! g:ComposerKnowWhereCurrentFileIs()
5964
let g:currentWord = expand('<cword>')
6065
let l:command = "grep " . g:currentWord . " ./vendor/composer -R | awk '{print $6}' | awk -F\\' '{print $2}'"

0 commit comments

Comments
 (0)