voldikss / vim-floaterm

:computer: Terminal manager for (neo)vim
MIT License
2.47k stars 78 forks source link

floaterm open gvim #349

Closed jqhr closed 2 years ago

jqhr commented 2 years ago

Environment

OS:

Question

I use vim in terminal, but floaterm command open file with gvim, not current vim editor. I find here. That line use v:progpath, not v:progname. For linux environment, the vim preinstalled not include clipboard feature, If I want that feature, I need to install gvim. By installed gvim, in terminal, I see "v:progname" was "vim", and "v:progpath" was "/usr/bin/gvim". So, when I execute floaterm command, it opened an new gvim window, not current vim instance. I change "v:progpath" to "v:progname", and it works. I just wonder if there are any other solutions?

Konfekt commented 5 months ago

I have the same problem that at https://github.com/voldikss/vim-floaterm/blob/fe61226f8990bb4d36fa274fdc5f6079535cedeb/autoload/floaterm/edita/vim/client.vim#L3 v:progpath is always set to gvim, opening a new gvim instance. @jqhr would you mind sharing how you solved it? @voldikss, would you consider a check for v:progname differing and opting for exepath(v:progname)?