augroup wm_soziopolisFolder autocmd! autocmd BufEnter **/soziopolis/**/tests/Acceptance/** execute "call WmSoziopolisSetupAcceptance()" augroup END function! WmSoziopolisSetupAcceptance() let l:env = 'localhost' " Allows switching via `:let g:codeception_env = 'prod'` if exists('g:codeception_env') let l:env = g:codeception_env endif let g:test#php#codeception#options = { \ 'nearest': '--env ' . l:env . ' --debug', \ 'file': '--env ' . l:env . ' --debug', \} endfunction