TaDaa / vimade

An eye friendly plugin that fades your inactive buffers and preserves your syntax highlighting!
MIT License
486 stars 8 forks source link

garbage chars since recent update release #23

Closed solyarisoftware closed 5 years ago

solyarisoftware commented 5 years ago

Hi

I love vimade, I installed with Plug 'TaDaa/vimade', but since recent update, put garbages chars on teh command line terminal when exiting;

$ vi
^[]10;rgb:ffff/ffff/ffff^[\^[]11;rgb:0000/0000/0000^[\^[]11;rgb:0000/0000/0000^G$ 

I'm using a gnome-terminal

$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41)
Patch incluse: 1-1453

$ echo $TERM
screen-256color
$ echo $SHELL
/bin/bash

I temporarily solved unplugging the vimade plugin :(

Available for any deepen

greg17477 commented 5 years ago

let g:vimade.detecttermcolors=0 should fix the issue.

solyarisoftware commented 5 years ago

thanks! but adding the line I got an "undefined variable" error:

$ vi
Errore/i eseguendo /home/giorgio/.vimrc:
riga   19:
E121: Variabile non definita: g:vimade^[]10;rgb:ffff/ffff/ffff^[\^[]11;rgb:0000/0000/0000^[\
Premi INVIO o un comando per proseguire
greg17477 commented 5 years ago

That's strange. I guess you enabled the plugin again?

solyarisoftware commented 5 years ago

you enabled the plugin again?

yes

let g:vimade.detecttermcolors=0 should fix the issue.

I did

let g:vimade_detecttermcolors=0

( _ instead of .).

Something changed. Now I got on exit this:

$ vi example/noidintents.json
tmux;tmux;tmux;tmux;$

Not solved yet

greg17477 commented 5 years ago

I see your using tmux. In the Readme:

Tmux is not working!

Vimade only works in a 256 or higher color mode and by default TMUX may set t_Co to 8. it is recommended that you set export TERM=xterm-256color before starting vim. You can also set set termguicolors inside vim if your term supports it for an even more accurate level of fading.

Experiment with that. I am using screen btw.

solyarisoftware commented 5 years ago

thanks for your help.

I modified .bashrc to set the TERM as you say, but I do not have success:


$ echo $TERM
xterm-256color

$ cat ~/.vimrc | grep vimade
Plug 'TaDaa/vimade'
let g:vimade_detecttermcolors = 0

$ vi
^[]10;rgb:aaaa/aaaa/aaaa^[\^[]11;rgb:0000/0000/0000^[\$ 

BTW; I have installed tmux and screen, but I don't use tmux.

greg17477 commented 5 years ago

It's dot and not underscore ;)

solyarisoftware commented 5 years ago

but with the DOT got the "not defined variable" error:


$ vi
Errore/i eseguendo /home/giorgio/.vimrc:
riga   19:
E121: Variabile non definita: g:vimade^[]10;rgb:aaaa/aaaa/aaaa^[\^[]11;rgb:0000/0000/0000^[\
Premi INVIO o un comando per proseguire
greg17477 commented 5 years ago

It is still a DOT man :)

i do not know your settings. Mayby you forgot the first mandatory line?

#grep -i vimade .vimrc let g:vimade = {} # <- this one here let g:vimade.detecttermcolors=0 let g:vimade.fadelevel=0.5

TaDaa commented 5 years ago

Thanks @greg17477 -- probably needs g:vimade={} and setting detecttermcolors as you said should resolve the issue.

@solyarisoftware - Thanks for the feedback on detecttermcolors, looks like it is still causing issues.

I am leaning towards removing automatic terminal color detection at this point as it seems to cause more problems than it solves. Vimade will still work with terminals, just not exactly for users inheriting terminal foreground/backgrounds. Vim8+ also has built in color detection that can be leveraged, but it doesn't work with tmux due to a different ansii query.

solyarisoftware commented 5 years ago

Yes guys, thanks. I forgot the object initialization. Now the problem is solved and I can use vimade again :)

TaDaa commented 5 years ago

Just an update on this detecttermcolors is now disabled by default, shouldn't need extra configuration in your vimrc to disable it.

Closing this for now, but feel free to reopen if you encounter related issues