File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ This command exec the installation flow of composer's install. This process requ
15
15
:ComposerInstall [--no-dev ..]
16
16
```
17
17
This command exec ` composer install ` . Now you can attach after this command a custom callback to exec your personal flow.
18
+
19
+ ``` vim
20
+ :ComposerInit [--no-dev ..]
21
+ ```
22
+ This command exec ` composer init ` .
23
+
18
24
``` vim
19
25
function! MyCallbackFunction()
20
26
exec ':silent ! ctags -a %'
@@ -28,6 +34,11 @@ In this example after every `composer install` I exec a ctags generation
28
34
```
29
35
This command exec ` composer update ` .
30
36
37
+ ``` vim
38
+ :ComposerRequireFunc
39
+ ```
40
+ This command exec ` composer require <vendor/repository> <version> ` .
41
+
31
42
``` vim
32
43
:ComposerJSON
33
44
```
Original file line number Diff line number Diff line change 24
24
25
25
command ! -narg =* ComposerRun call s: ComposerRunFunc (<q-args> )
26
26
command ! -narg =* ComposerInstall call s: ComposerInstallFunc (<q-args> )
27
+ command ! -narg =* ComposerInit call s: ComposerInit (<q-args> )
27
28
command ! -narg =* ComposerUpdate call s: ComposerUpdateFunc (<q-args> )
29
+ command ! -narg =* ComposerRequire call s: ComposerRequireFunc (<q-args> )
30
+
28
31
command ! ComposerGet call s: ComposerGetFunc ()
29
32
command ! ComposerJSON call s: OpenComposerJSON ()
30
33
@@ -56,10 +59,18 @@ function! s:ComposerInstallFunc(arg)
56
59
endif
57
60
endfunction
58
61
62
+ function ! s: ComposerInit ()
63
+ exe s: ComposerRunFunc (" init" )
64
+ endfunction
65
+
59
66
function ! s: ComposerUpdateFunc (arg)
60
67
exe s: ComposerRunFunc (" update" )
61
68
endfunction
62
69
70
+ function ! s: ComposerRequireFunc ()
71
+ exe s: ComposerRunFunc (" require" )
72
+ endfunction
73
+
63
74
function ! g: ComposerKnowWhereCurrentFileIs ()
64
75
let g: currentWord = expand (' <cword>' )
65
76
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