vifm / vifm.vim

Vim plugin that allows use of vifm as a file picker
333 stars 19 forks source link

Netrw is opened after selection of file/folder in vim #40

Closed pglira closed 4 years ago

pglira commented 4 years ago

I'm using the vifm plugin for vim on several PCs - so far without any problems. However, today I installed the plugin on a new PC where a strange problem occurs. After :EditVifm vifm shows up. However, when I select a file or a folder vifm disappears and netrw is shown instead.

I've tried to set in my .vimrc: let g:vifm_replace_netrw = 1 but that doesn' really help: sometimes vifm remains opened, sometimes netrw shows up again.

Any ideas what might be the issue?

I'm using vifm 0.10.1 and vim 8.0.

xaizek commented 4 years ago

You can try disabling netrw in .vimrc too. See :h netrw-noload. vifm.vim tries to do it, but essentially it's too late at that point because netrw is loaded before vifm.vim.

It seems to work even without disabling netrw, but there are cases when it doesn't. I guess something differs in your setup of Vim 8.0 and it doesn't work at all there. I don't remember seeing behaviour you describe, it could be that some changes in the plugin contribute to the issue.

pglira commented 4 years ago

Thank you for the quick reply.

However, when I add

let g:loaded_netrw = 1
let g:loaded_netrwPlugin = 1

(as suggested in :h netrw-noload) to my vimrc this appears when I select a folder in vifm: image So it seems that vifm returns the folder to vim instead of entering the folder.

xaizek commented 4 years ago

Is the directory selected when you're trying to enter it in vifm?

pglira commented 4 years ago

No, it is not selected. I just tried to enter a directory to select a file. I tried both, the l and the enter key.

xaizek commented 4 years ago

Are you using vifm 0.10.1 or a build from master branch? You mentioned 0.10.1 above, but that's broken in current master (after finally doing some long-postponed changes, which were postponed due to possibility of such breakage), which makes me question that.

pglira commented 4 years ago

You're right. I compiled the master branch yesterday. It's working now with the source code release from the website. Thank you for your help!

xaizek commented 4 years ago

And thank you for the bug report, I didn't know it's broken until you've filed the issue. It's fixed now.