Skip to content

Commit da1ee23

Browse files
author
Gianluca Arbezzano
committed
Merge pull request #16 from sensorario/master
Local variable are now global in ComposerKnowWhereCurrentFileIs
2 parents a1bc756 + 549c7ff commit da1ee23

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugin/vim-composer.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ function! s:ComposerInstallFunc(arg)
5555
endif
5656
endfunction
5757

58-
function! ComposerKnowWhereCurrentFileIs()
59-
let l:currentWord = expand('<cword>')
60-
let l:command = "grep " . l:currentWord . " ./vendor/composer -R | awk '{print $6}' | awk -F\\' '{print $2}'"
58+
function! g:ComposerKnowWhereCurrentFileIs()
59+
let g:currentWord = expand('<cword>')
60+
let l:command = "grep " . g:currentWord . " ./vendor/composer -R | awk '{print $6}' | awk -F\\' '{print $2}'"
6161
let l:commandFileFound = l:command . ' | wc -l'
62-
let l:numberOfResults = system(l:commandFileFound)
63-
if l:numberOfResults == 1
62+
let g:numberOfResults = system(l:commandFileFound)
63+
if g:numberOfResults == 1
6464
let l:fileName = system(l:command)
6565
let l:openFileCommand = 'tabe .' . l:fileName
6666
exec l:openFileCommand

0 commit comments

Comments
 (0)