vifm / vifm.vim

Vim plugin that allows use of vifm as a file picker
325 stars 18 forks source link

Display is not working in TMUX #69

Open neumachen opened 2 years ago

neumachen commented 2 years ago

I am not sure what the issue is for this to be happening, can anyone point me to the right direction so I can attempt to fix it?

As you can see, I am seeing some weird characters but in my normal mode (outside tmux) it works just fine.

Screen Shot 2021-10-17 at 10 45 16
xaizek commented 2 years ago

Compare output of echo $TERM and locale inside and outside of tmux. $TERM should be tmux* (or if not available: screen*) and locale shouldn't differ and use UTF-8.

neumachen commented 2 years ago

It seems I had to set the vifm_term to tmux if it's inside the tmux shell.

neumachen commented 2 years ago

Also, it seems after I open SQL files the locale vars get changed to "C".

xaizek commented 2 years ago

It seems I had to set the vifm_term to tmux if it's inside the tmux shell.

You're already in tmux, running it second time isn't really a good idea and tmux vifm won't actually work.

Also, it seems after I open SQL files the locale vars get changed to "C".

That might be the cause (similar issue was #48).

neumachen commented 2 years ago

I learned more about this, it seems the issue is caused by this plugin, https://github.com/voldikss/vim-floaterm. I just don't know how it's changing the LANG vars. But I'm not 100% because what I've noticed is, when I open vifm for the first time inside VIM, it's okay. But once I open a file, that's when things go wonky.

xaizek commented 2 years ago

Looks like it sets up environment variables here and something goes wrong (accidentally resets LC_* variables for example). If that's the issue, you should create an issue in that repository as it's only indirectly related to Vifm.

neumachen commented 2 years ago

So what exactly is the fix here? Remove the plugin? Because I think I did that already.

xaizek commented 2 years ago

If the plugin causes this, it can probably be fixed. If it's not the plugin, need to find an actual cause. You can temporarily leave only vifm.vim and comment out contents of vimrc to see if anything changes.