TaDaa / vimade

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

E254: Cannot allocate color #7

Closed tammersaleh closed 5 years ago

tammersaleh commented 5 years ago

I love this plugin! Works fine on my mac, but I'm getting two errors when I run this on Ubuntu under tmux:

E254: Cannot allocate color #6533a

This happens when I switch between windows. The hex value changes, but it's always 5 digits instead of 6. It's comming from vimade.py, line 534, vim.command('|'.join(exprs)). I'd show the entire stack trace, but haven't figured out how to copy-n-paste from tmux yet 💯

The second error is E171: Missing :endif, which actually shows up at the same time, after the E254 error.

My .vimrc is here, and here are the versions of all the things:

$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan 16 2019 17:18:38)
Included patches: 1-750
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    -tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +textprop
+byte_offset       -hangul_input      +num64             +timers
+channel           +iconv             +packages          +title
+cindent           +insert_expand     +path_extra        -toolbar
-clientserver      +job               +perl              +user_commands
-clipboard         +jumplist          +persistent_undo   +vartabs
+cmdline_compl     +keymap            +postscript        +vertsplit
+cmdline_hist      +lambda            +printer           +virtualedit
+cmdline_info      +langmap           +profile           +visual
+comments          +libcall           -python            +visualextra
+conceal           +linebreak         +python3           +viminfo
+cryptv            +lispindent        +quickfix          +vreplace
+cscope            +listcmds          +reltime           +wildignore
+cursorbind        +localmap          +rightleft         +wildmenu
+cursorshape       -lua               +ruby              +windows
+dialog_con        +menu              +scrollbind        +writebackup
+diff              +mksession         +signs             -X11
+digraphs          +modify_fname      +smartindent       -xfontset
-dnd               +mouse             +startuptime       -xim
-ebcdic            -mouseshape        +statusline        -xpm
+emacs_tags        +mouse_dec         -sun_workshop      -xsmp
+eval              -mouse_gpm         +syntax            -xterm_clipboard
+ex_extra          -mouse_jsbterm     +tag_binary        -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/home/linuxbrew/.linuxbrew/share/vim"
Compilation: gcc-5 -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc-5   -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -L/home/linuxbrew/.linuxbrew/opt/libyaml/lib  -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libyaml/lib -L/home/linuxbrew/.linuxbrew/opt/openssl/lib  -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl/lib -L/home/linuxbrew/.linuxbrew/opt/readline/lib  -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/readline/lib -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/5.28.1/x86_64-linux-thread-multi/CORE   -L/usr/local/lib -Wl,--as-needed -o vim        -lm -lnsl   -lncurses -ldl   -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/5.28.1/x86_64-linux-thread-multi/CORE  -fstack-protector-strong -L/usr/local/lib  -L/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/5.28.1/x86_64-linux-thread-multi/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc  -L/home/linuxbrew/.linuxbrew/Cellar/python/3.7.2_1/lib/python3.7/config-3.7m-x86_64-linux-gnu -lpython3.7m -lpthread -ldl -lutil -lm  -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/ruby/2.6.0_1/lib -L/home/linuxbrew/.linuxbrew/Cellar/ruby/2.6.0_1/lib -lruby -lm     

$ tmux -V
tmux 2.8

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

$ echo $TERM
xterm-256-color

(and my emulator is Kitty, v0.13.1, but this also happens using the OSX terminal.app)

TaDaa commented 5 years ago

Thanks for info! Will take a look later tonight

TaDaa commented 5 years ago

Just pushed a fix, update and let me know how it goes!

tammersaleh commented 5 years ago

Works like a charm! I'm impressed by how performant this plugin is! Would you be interested in writing up a brief summary of how it works in the README.md?