File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ In this example after every `composer install` I exec a ctags generation
2828```
2929This command exec ` composer update ` .
3030
31+ ``` vim
32+ :ComposerRequireFunc
33+ ```
34+ This command exec ` composer require <vendor/repository> <version> ` .
35+
3136``` vim
3237:ComposerJSON
3338```
Original file line number Diff line number Diff line change 2525command ! -narg =* ComposerRun call s: ComposerRunFunc (<q-args> )
2626command ! -narg =* ComposerInstall call s: ComposerInstallFunc (<q-args> )
2727command ! -narg =* ComposerUpdate call s: ComposerUpdateFunc (<q-args> )
28+ command ! -narg =* ComposerRequire call s: ComposerRequireFunc (<q-args> )
29+
2830command ! ComposerGet call s: ComposerGetFunc ()
2931command ! ComposerJSON call s: OpenComposerJSON ()
3032
@@ -60,6 +62,10 @@ function! s:ComposerUpdateFunc(arg)
6062 exe s: ComposerRunFunc (" update" )
6163endfunction
6264
65+ function ! s: ComposerRequireFunc (repo, version )
66+ exe s: ComposerRunFunc (" require" , repo, version )
67+ endfunction
68+
6369function ! g: ComposerKnowWhereCurrentFileIs ()
6470 let g: currentWord = expand (' <cword>' )
6571 let l: command = " grep " . g: currentWord . " ./vendor/composer -R | awk '{print $6}' | awk -F\\ ' '{print $2}'"
You can’t perform that action at this time.
0 commit comments