TaDaa / vimade

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

Does not dim ascii encoded image e.g., 📖 #51

Open EdmundsEcho opened 3 years ago

EdmundsEcho commented 3 years ago

I'm not sure what might be entailed, but I've recently started to use ascii-encoded images to help augment my documentation. I noticed these symbols are not being impacted by the dimming algorithm. Is there a fix for that?

On a related note: I use transparency in my background. So for instance, dimming just the characters does not fully emulate what happens when iTerm2 dims the inactive tmux panes. Is there a way to configure the change to brighten the background?... I believe that's how to get the dim effect when using transparency. For instance, my transparent window is best viewed when the background is black. The less black, the more dim it looks.

Thank you in advance for any guidance.

- E

TaDaa commented 3 years ago

Mind sending a screenshot for the ascii image? -- or if there is a sample scenario that I can reproduce I can take a look when I have some time. There is definitely a misalignment with some special character codes in the strings that are parsed vs what can be shown in the UI.

For changing the tint of the fade:

let g:vimade={}
let g:vimade.basebg=[128,128,128] " either rgb array or hex string
EdmundsEcho commented 3 years ago

Here is the screen animation requested. The three windows are all vsplits within neovim. The window on the far left is a NERDTree buffer instance.

Here are the observations discussed in addition to a couple of others.

  1. 🦀 There are two of the discussed emoji symbols. I increased the dim to highlight the fact that they do not change tint. The ideal behavior would be to dim the symbols to emulate the other characters.

  2. 🦀 This lack of dimming behavior also occurs with ligatures (link to ligature on github).

  3. 👎 A NERDTree buffer is treated like any other buffer. Is there a way to ignore a buffer with NERDTree?

  4. 👍 The plugin does not shade the window when the same buffer is open in multiple windows; this is a good thing (not shown). When I have two windows for the same buffer, it's usually because I'm referencing and working on two disparate parts of the same file.

  5. 🦀 I use hlsearch option to highlight every instance of a search (in the command window: /findThisWord). In the event the buffer gets toggled dim/not dim, the color of the highlighted words sometimes remains in the dimmed mode; intermittently. I also use the lazyredraw option that might explain it. So all in all, more of an FYI.

Thank you for the recommendation on how to set the background color. When I adjust the VimadeFadeLevel am I changing the background AND character color? Also, "changing color" means just changing the "brightness" of each? (I suppose the 'magic' is in how the plugin translates changes in brightness to changes in the rgb color?)

Again, great plugin. It's great "as is". I hope this information is a useful contribution.

- E

vimade_sample

TaDaa commented 3 years ago

Cool thanks -- will take a look on the emoji and ligatures -- emoji I can see being more difficult to support, but who knows -- worth checking.

For nerdtree, something like this should work:

au FileType nerdtree VimadeBufDisable

On hlsearch -- give this a go and see if it has more desireable behavior:

let g:vimade.fadepriority=0

Thats right on VimadeFadeLevel (g:vimade.fadelevel) - the property adjusts the interpolation/opacity of the faded foreground color towards g:vimade.basebg. guibg/ctermbg do get faded as well for non-Normal highlight groups, which is used as the default basebg. basebg can help make adjustments to the color if the tint needs to be different from the default Normal color.