Open z0rel opened 4 years ago
What's your version of vifm.vim and are there any settings for it?
The latest version will use :terminal
inside gvim when it's available. Otherwise a terminal will be used instead (xterm
by default, specified via g:vifm_term
).
:!vifm
inside gvim won't work properly anyway (it's not meant to).
My version vifm.vim is installed through Vundle and the default version is the master (9db471361e167453db7ccb7940ea591329e0adf2, xaizek 2019-11-30 00:17:54
)
Using :debug Vifm
, I found that the error occurs after the call:
function <SNR>71_StartVifm
line 97: let buf = term_start(['/bin/sh', '-c', termcmd], options)
and only if gvim is executed from the click on kde plasma gvim.desktop. If I launch givm from the Konsole in the same directory ($HOME
) and then I enter :Vifm
, the error does not occur.
The error is following:
The error was found during processing function <SNR>71_StartVifm[98]..VifmExitCb:
line 1:
E121: Undefined variable: b:data
line 2:
E121: Undefined variable: data
line 8:
E121: Undefined variable: data
line 11:
E121: Undefined variable: data
E116: The parameters for the function type(data.cwdjob) == v:t_job are incorrect
line 14:
E121: Undefined variable: data
E116: The parameters for the function <SNR>71_HandleRunResults are incorrect
function <SNR>71_StartVifm[98]..VifmExitCb
I tried to debug the cause of premature call the VifmExitCb, but I do not understand how to do it.
Undefined variable: b:data
This is more of a symptom as well (although this could be handled better), term_start()
fails fast and calls calllback before b:data
is set. What's interesting is why it fails.
only if gvim is executed from the click on kde plasma gvim.desktop
You can try doing :read !env
in gvim run from plasma and from command-line and look for differences.
As a workaround you can always set g:vifm_embed_term
to 0 to make vifm run outside Vim (and probably configure Konsole to be used for it).
I'm trying to run Vifm on Gentoo Linux in gvim 8.1.1486 through vifm/vifm.vim plugin. When I run it, there an error occurs with message
Got non-zero code from vifm: 1
When I run the
!vifm
, it is given :Search in the vifm source code displays the following:
has_colors
- is the function fromcurses.h
:Because of this code, Vifm does not work in my GUI version Gvim on Linux. However, in Windows Vifm fine starts in gvim. Also, if I run :terminal vifm, vifm also fine starts in GVim.