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
1515:ComposerInstall [--no-dev ..]
1616```
1717This 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+
1824``` vim
1925function! MyCallbackFunction()
2026 exec ':silent ! ctags -a %'
@@ -28,6 +34,11 @@ In this example after every `composer install` I exec a ctags generation
2834```
2935This command exec ` composer update ` .
3036
37+ ``` vim
38+ :ComposerRequireFunc
39+ ```
40+ This command exec ` composer require <vendor/repository> <version> ` .
41+
3142``` vim
3243:ComposerJSON
3344```
Original file line number Diff line number Diff line change 2424
2525command ! -narg =* ComposerRun call s: ComposerRunFunc (<q-args> )
2626command ! -narg =* ComposerInstall call s: ComposerInstallFunc (<q-args> )
27+ command ! -narg =* ComposerInit call s: ComposerInit (<q-args> )
2728command ! -narg =* ComposerUpdate call s: ComposerUpdateFunc (<q-args> )
29+ command ! -narg =* ComposerRequire call s: ComposerRequireFunc (<q-args> )
30+
2831command ! ComposerGet call s: ComposerGetFunc ()
2932command ! ComposerJSON call s: OpenComposerJSON ()
3033
@@ -56,10 +59,18 @@ function! s:ComposerInstallFunc(arg)
5659 endif
5760endfunction
5861
62+ function ! s: ComposerInit ()
63+ exe s: ComposerRunFunc (" init" )
64+ endfunction
65+
5966function ! s: ComposerUpdateFunc (arg)
6067 exe s: ComposerRunFunc (" update" )
6168endfunction
6269
70+ function ! s: ComposerRequireFunc ()
71+ exe s: ComposerRunFunc (" require" )
72+ endfunction
73+
6374function ! g: ComposerKnowWhereCurrentFileIs ()
6475 let g: currentWord = expand (' <cword>' )
6576 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