TaDaa / vimade

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

tmux support + some other questions #6

Closed taylorthurlow closed 5 years ago

taylorthurlow commented 5 years ago

I'm unable to see any dimming effect.

I'm using kitty with tmux 2.6. tmux sets TERM to screen-256color but I've tried manually setting it to xterm-256color. That said, I can't get it to do anything outside of tmux, either. By default kitty uses xterm-kitty, but setting it manually to xterm-256color also doesn't solve the issue.

Any recommended steps I can take to start assessing which part isn't working? I can set settings and all my investigating would suggest the plugin is installed, loaded, and working. I just don't see changes which makes me think something's up with the colors.

Cheers!

TaDaa commented 5 years ago

pushed a fix where normalid couldn't be resolved on some terminals, let me know if it fixes this for you

taylorthurlow commented 5 years ago

No change as far as I can tell. I did a Vundle PluginUpdate and I saw the update go through, but I'm not sure how to check version numbers.

TaDaa commented 5 years ago

Was able to verify kitty 0.13.1 on debian (0.9.6) and on macos, both running nvim 0.3.4.

Whats the output from 'echo &t_Co' and 'echo g:vimade' -- also what OS + versions are you running for vim/nvim

taylorthurlow commented 5 years ago

echo &t_Co: 256 echo g:vimade: {'basebg': '', 'basefg': '', 'fadelevel': 0.4, 'rowbufsize': 30, 'colbufsize': 30, 'norma lid': 49, 'checkinterval': 32}

I'm on Ubuntu 18.04.1 LTS and kitty 0.13.1.

Vim compilation and version info:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan  7 2019 15:01:45)
Included patches: 1-702
Compiled by taylorthurlow
Huge version with GTK2 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_gui    +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_interact
+eval              -mouse_gpm         +syntax            +xterm_clipboard
+ex_extra          -mouse_jsbterm     +tag_binary        -xterm_save
TaDaa commented 5 years ago

I'll keep digging tonight..seems to be working for me though, but my versions are slightly out of sync vs yours..running tmux 2.3, vim 8.1 + gtk2, ubuntu 18.04.1. Works in tmux in kitty, tmux by itself, kitty by itself, and gnome on my machine --

Wonder if anything else is going on -- if you type :messages is it clean? Does the fading work in gnome terminal? Is syntax highlighting working at all?

If you have a minimal vimrc with the issue that may help

taylorthurlow commented 5 years ago

Thanks for the help. :messages is clean, though it does list the current files I have open which seems normal. Same problem with Gnome terminal. I'm going to try with a minimal vimrc and get back to you.

taylorthurlow commented 5 years ago

I missed the fact that you asked about syntax higlighting, and yes - it does work properly. Here's my minimal vimrc:

" Vundle
set nocompatible " required by Vundle
filetype off     " required by Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'TaDaa/vimade'
call vundle#end()
filetype plugin indent on " required by Vundle

set nocompatible " Don't maintain compatibility with Vi
set t_Co=256 " 256 color terminal

if !exists('g:syntax_on')
  syntax enable
endif

I'm still experiencing the same issue.

TaDaa commented 5 years ago

awesome! thanks -- should be able to get this fixed later tonight

taylorthurlow commented 5 years ago

Thanks! No rush - it's definitely a plug-in I'd like to use on the regular, but I'm not dying without it. Let me know if I can help any other way.

TaDaa commented 5 years ago

That was a rabbit hole! I think I have it working at least somewhat sanely now... For terminal there was a possibility that ctermfg/ctermbg does not get set (when it uses the terminal defaults). There isn't a 100% way of getting the terminal settings (and tmux n, but Vimade should at least try now and default to 0/248 if it can't.

I think for best results a colorscheme that specifies Normal colors needs to be used, or vimade needs to be configured using g:vimade.basebg and g:vimade.basefg. I'll update the readme, but I think it should autodetect for you on Ubuntu + Kitty (which prints the right codes -- Alacritty is another story)

TaDaa commented 5 years ago

nm --close but not quite..breaks neovim

TaDaa commented 5 years ago

should be good now, supports auto detect terminal background and foreground on tilix, kitty, and gnome now (for vim8 only --not neovim)

taylorthurlow commented 5 years ago

@TaDaa Working great now, thanks!