Closed mohabmetwalli closed 2 years ago
Vifm.vim always uses Vim's theme
It can't, it probably just looks like it.
Please provide terminal information from the bottom of :vifm
menu when Vifm is launched inside Vim, it might be helpful. I suspect $TERM
value gets set to something that supports only 16 colors, this is especially likely when using gVim.
Please provide terminal information from the bottom of
:vifm
menu when Vifm is launched inside Vim, it might be helpful.
echo $TERM
from inside Vifm.vim returns xterm-256color
too. I'm using terminal-based Neovim, and xfce4-terminal.
This is how the plugin behaves; I think only the background color tries to match that from Vim's current color scheme.
In addition to that, :colorscheme
does not work inside Vifm.vim. It doesn't throw an error, but it doesn't have any effect.
Oh, that's just "default" colors. Terminal has one for background and foreground and programs can use them to match terminal's theme, builtin terminals have them too. You can modify Vifm's color scheme to not have "default", "-1" or "None" for colors to get rid of this effect.
:colorscheme
should work though unless Neovim's terminal is doing something with the palette. Vifm just uses colors as they are specified in the color scheme and terminal information looks correct. Having
highlight Win ctermbg=default
in colorschemes is quite common, so I wouldn't be surprised if it's responsible for an impression that colorscheme isn't changed.
Thank you for the helpful information, I think :colorscheme
worked all along, but the background color matching Neovim's color scheme change is what confused me. I'm beginning to figure it out, but shouldn't both Vifm.vim and Vifm show the same color if I'm using the same color scheme?
This is Vifm.vim, launched from inside Neovim with :TabVifm
command, and displaying the output of :colorscheme?
at the bottom:
This is Vifm launched directly from xfce4-terminal:
Some options seem to be defaulting to terminal colors in Vifm.vim, but not in Vifm even though I'm using the same color scheme for both. They're both loading form the same file, essentially, but displaying different results.
Things like nmap
, vmap
highlighted in red suggest that Neovim applies syntax rules to the terminal buffer, see if 'syntax'
is set for it. I think Vim automatically disables things that make no sense in terminal buffers, but Neovim might need to have them disabled explicitly.
I tried :syntax clear
, :syntax off
, and :ownsyntax off
, but the problem presists; however, :set nospell
did the trick.
I tried :syntax spell notoplevel
but it wasn't enough to disable highlighting spelling errors inside Vifm.vim; however, I can do something like :setlocal nospell | :Vifm
to get Vifm.vim to launch with a clean color scheme, and :tabnew | :setlocal nospell | :Vifm
as an alternative to :TabVifm
.
It seems the behavior is tied to Neovim spell-checking comments, so as long as that is enabled, it will continue to check :Vifm
output for spelling mistakes whenever it's launched with any of the plugin's commands. Unless there's a Neovim option I missed that can disable spell-checking/highlighting spelling mistakes in this particular scenario...
Thank you for your help. If there's nothing else that can be done, I think I'm satisifed with this solution for the most part, so I will close this issue tomorrow.
Spelling, of course, should have guessed by the curly line. Thanks, I've added setlocal nospell
, which seems to fix it.
Even without using
:VifmCs
, when launched through the plugin's commands, Vifm.vim always uses Vim's theme, or an approximation thereof, and Vifm's native:colorscheme
command doesn't have any effect.Can this behavior be disabled/altered so I can set a separate theme for Vifm.vim?