justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.19k stars 64 forks source link

update lcd on when specifically navigating dirvish buffers #199

Closed Melandel closed 3 years ago

Melandel commented 4 years ago

Hello,

I am in the process of transitioning from gVim to WSL2 and noticed something.

On gVim (windows 10), BufEnter triggers whenever I use dirvish#open("edit", 0) However, on WSL2 (Ubuntu LTS 20.04), BufEnter just doesn't trigger.

In my previous config, I have this line:

autocmd BufEnter * if &ft!='dirvish' | Lcd | else | lcd %:p:h | endif

which allows me to control lcd the way I want: my lcd is always in sync with the dirvish buffer I'm in when I navigate through dirvish#open()

What would be the config I need to have in order to have this behavior on WSL2, and is it normal at all that BufEnter doesn't trigger in WSL2?

justinmk commented 3 years ago

is it normal at all that BufEnter doesn't trigger in WSL2?

it's not normal. could be a bug in vim. are you using a recent version of vim?

if it's still an issue, see if there is any difference between the buffer names (file paths). and then we can narrow it down.