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
28
28
```
29
29
This command exec ` composer update ` .
30
30
31
+ ``` vim
32
+ :ComposerRequireFunc
33
+ ```
34
+ This command exec ` composer require <vendor/repository> <version> ` .
35
+
31
36
``` vim
32
37
:ComposerJSON
33
38
```
Original file line number Diff line number Diff line change 25
25
command ! -narg =* ComposerRun call s: ComposerRunFunc (<q-args> )
26
26
command ! -narg =* ComposerInstall call s: ComposerInstallFunc (<q-args> )
27
27
command ! -narg =* ComposerUpdate call s: ComposerUpdateFunc (<q-args> )
28
+ command ! -narg =* ComposerRequire call s: ComposerRequireFunc (<q-args> )
29
+
28
30
command ! ComposerGet call s: ComposerGetFunc ()
29
31
command ! ComposerJSON call s: OpenComposerJSON ()
30
32
@@ -60,6 +62,10 @@ function! s:ComposerUpdateFunc(arg)
60
62
exe s: ComposerRunFunc (" update" )
61
63
endfunction
62
64
65
+ function ! s: ComposerRequireFunc (repo, version )
66
+ exe s: ComposerRunFunc (" require" , repo, version )
67
+ endfunction
68
+
63
69
function ! g: ComposerKnowWhereCurrentFileIs ()
64
70
let g: currentWord = expand (' <cword>' )
65
71
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