How can I run vim-rooter's function FindRootDirectory()
instead of /vagrant/my_project
? I have tried multiple variations like:
set makeprg=FindRootDirectory().'/app/Console/cake test '.expand('%:p')
set makeprg=FindRootDirectory()."/app/Console/cake" test %:p
+++UPDATE+++
let &makeprg=FindRootDirectory()."/app/Console/cake test %:p"
does work, but I'm also getting a black screen instead of my previous opened file. Do you know how can I get only results in the bottom?
And I'm getting this errors after running the vim
command:
E117: 未知の関数です(Unknown function): FindRootDirectory
E15: 無効な式です(Invalid expression): FindRootDirectory()."/app/Console/cake test %:p"
Was able to solve it by:
autocmd VimEnter * let &makeprg=FindRootDirectory()."/app/Console/cake test %:p"