Skip to content

Commit d4d9904

Browse files
author
Simone Gentili
committed
Considered current as the vendor folder
Instead of directly open ctrlp with current word, ComposerKnowWhereCurrentFileIs show a message that explain that there is not only one occurency of cword in composer auto-generated files.
1 parent ca37140 commit d4d9904

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/vim-composer.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ endfunction
5858
map <F6> :call ComposerKnowWhereCurrentFileIs()<CR>
5959
function! ComposerKnowWhereCurrentFileIs()
6060
let l:currentWord = expand('<cword>')
61-
let l:command = "grep " . l:currentWord . " vendor/composer -R | awk '{print $6}' | awk -F\\' '{print $2}'"
61+
let l:command = "grep " . l:currentWord . " ./vendor/composer -R | awk '{print $6}' | awk -F\\' '{print $2}'"
6262
let l:commandFileFound = l:command . ' | wc -l'
6363
let l:numberOfResults = system(l:commandFileFound)
6464
if l:numberOfResults == 1
6565
let l:fileName = system(l:command)
6666
let l:openFileCommand = 'tabe ' g:project_path . l:fileName
6767
exec l:openFileCommand
6868
else
69-
exec "normal \<c-p>" . expand('<cword>')
69+
echo "No unique file found in composer's generated files"
7070
endif
7171
endfunction

0 commit comments

Comments
 (0)