>>784
> :autocmd WinEnter * if isdirectory(expand("%:p:h")) | execute "lcd ".execute("%:p:h") | endif
間違えました。こうです。
:autocmd WinEnter * if isdirectory(expand("%:p:h")) | execute "lcd ".expand("%:p:h") | endif