Closed lanox closed 4 years ago
Thanks for the info--
I am seeing that in vim latest that termguicolors
may not be working properly with tmux + screen-256color
. If I remember correctly there also may be additional config required for tmux to work with termguicolors.
Can you let me know the results of echo &termguicolors
. Tmux may require additional configuration if you are using it. You can tell if termguicolors is working properly by altering guibg highlights, -- e.g. hi Normal guibg=#FFFFFF
should change the background to white. If it doesn't turn white, tmux requires additional config or you may need to disable termguicolors in your vimrc.
Another thing to try is setting export TERM=xterm-256color
before running vim. This should work even if termguicolors was set, but there will still likely be some color loss when fading.
No Problems,
echo &termguicolors
returns 1
hi Normal guibg=#FFFFFF
does change background to white.
I have tried setting export TERM=xterm-256color
while in tmux and just before starting vi.
I have tried using tmux-256color
with out any luck either.
I should note as well that I am using neovim.
oh think I just realized that I completely misread the issue!
So vimade is working within a single split in tmux. But you are expecting it to dim the last active/current window when you switch tmux splits? I see this is an interesting idea/enhancement. I think from the vimade standpoint there would need to be some way to detect focus changes since FocusGained and FocusLost don't seem to work consistently in terminals and tmux, but maybe there is another plugin that can be used? I'll look into this some more later.
Any feedback / ideas welcome as well -- not an active tmux user, so if you have settings / plugins that are working to enable focus events let me know.
I think we could probably expose a new command to fade/unfade the active window and instructions for binding it to FocusLost/FocusGained
Currently this should work in nvim now (Vim is not supported for this feature -- FocusGained and FocusLost don't seem to work consistently there) -- it requires a plugin to enable FocusGained and FocusLost events in tmux as well as setting the appropriate tmux config (set -g focus-events on
) in your tmux config.
There are a few options for plugins that enable focus, but I have verified at the very least this one is working: https://github.com/tmux-plugins/vim-tmux-focus-events
Additionally if tmux users can enable this functionality by adding the following to vimrc:
au! FocusLost * VimadeFadeActive
au! FocusGained * VimadeUnfadeActive
Let me know how it goes -- I will update the docs and readme with this later today
Changed vimade integration into this -- wasnt too happy with ForceFade naming..updated above as well
au! FocusLost * VimadeFadeActive
au! FocusGained * VimadeUnfadeActive
Hi @TaDaa
That seem to be working however vimade seem to be very slow when loading vim.
this is what i got on startup time.
Slowest 10 plugins (out of 26)~
vimade 306.796
[runtime] 278.758
gruvbox 20.323
coc.nvim 12.408
nerdtree 10.344
[vimrc] 8.170
vim-airline 4.921
delimitMate 3.646
vim-devicons 2.739
vim-go 1.636
Did this just start from latest change? Also any buffers being preloaded during startup? They can add to vimade startup time.
@TaDaa no it was quiet slow for me to start off, no I do not have any buffers preloaded, If you have any other ideas how to trouble shoot this I can help.
startup time should now be improved (at least according to profiler) in #29 -- feel free to reopen if needed.
Hi, After further troubleshooting I have narrowed it down to tmux.
So I saw in FAQ/Help that you mention tmux will not work if TERM is not set correctly.
Problem Summery: In tmux split mode
One side I have vim and in another just terminal. if I have multiple vim splits, vimade will dim the vim split that I am not in, however if I change to tmux split to terminal vimade will not dim the other vim pane.
inside tmux echo $TERM is showing screen-256color
outside tmux xterm-256color