vifm / vifm.vim

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

Shell opens when using :Vifm command to open file #54

Closed normen closed 3 years ago

normen commented 4 years ago

On Windows 10 with Vifm 0.11 and VIM 8.2

In VIM I am opening an instance of Vifm using :Vifm and then select a file to open by pressing return. Instead of directly opening the file instead a shell opens which I have to exit using the "exit" command and then only it goes back to VIM and shows the selected file.

VIM (plain, not NeoVim or somesuch) has been installed through the official windows installer. To install vifm I created a .vifm folder in c:\Users\Normen.vifm and copied the stuff from the "data" folder inside..

..I don't have much experience with Windows and try to replicate my Mac/Linux dev setup as good as I can on a work machine here, let me know if theres any other info you need.

Cheers for this great file manager! Normen

xaizek commented 4 years ago

Seems to work for me with g:vifm_embed_term enabled or disabled. Does Vifm open inside Vim for you? And where is the shell that you need to close, is it a separate console window or the same where Vifm used to be?

normen commented 4 years ago

Yeah, vifm is opening "as normal" inside VIM (or rather replacing it) when I use my Ctrl-E shortcut (:Vifm), when I select a file pressing return I see a full-screen cmd.exe in that same shell window or ssh connection - as if it tried to open the file using cmd.exe? When I exit that cmd.exe using the exit command I very shortly see vifm and then I see VIM with the file I selected opened.

normen commented 4 years ago

I should mention that it does work as expected in gvim on the same machine with the same setup.

xaizek commented 4 years ago

I didn't even think about terminal Vim and tested in gVim. It might be fixed on master by latest commit, please give it a try.

normen commented 4 years ago

Sorry, reading back I realize that I didn't mention I'm running on command line with any word 😅

With the latest master I'm getting E492: Kein Editorbefehl: VIFM_OPEN_TYPE Documents\desktop.ini ("No editor command" for the file I tried to open).

normen commented 4 years ago

Hm, this happens in gvim too now..

xaizek commented 4 years ago

Damn Windows... Reverted that attempt. So far I don't even get how come it's VIFM_OPEN_TYPE (%VIFM_OPEN_TYPE% would make more sense).

normen commented 4 years ago

Damn Windows...

Amen 😂

xaizek commented 4 years ago

@normen, please try new master. Maybe it's fixed properly this time.

normen commented 4 years ago

Cool - monday at work or when I get to another Windows PC I can abuse :)

normen commented 3 years ago

Hm, I didn't test on windows yet but on MacOS now it seems like :VsplitVifm doesn't work anymore, the new file is opened in place of the current file instead of in a split..?

xaizek commented 3 years ago

Decided to remove Windows-specific workaround while at it and broke Unix systems... Thanks for catching it!

normen commented 3 years ago

Awesome, works again!

normen commented 3 years ago

Okay, tested the latest version on windows and vifm works as expected both on command line and in gvim.

Thanks again, you're making my life easier. Cheers, Normen